CMakeLists.txt
author Alpar Juttner <alpar@cs.elte.hu>
Wed, 17 Oct 2018 22:56:43 +0200
changeset 1415 959d78f3fe0e
parent 1346 f95b18d99843
parent 1398 389416f8a995
child 1417 2236d00ca778
permissions -rw-r--r--
Merge #597
     1 CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
     2 
     3 IF(POLICY CMP0048) 
     4   CMAKE_POLICY(SET CMP0048 OLD) 
     5 ENDIF(POLICY CMP0048)
     6 
     7 IF(POLICY CMP0043) 
     8   CMAKE_POLICY(SET CMP0043 OLD) 
     9 ENDIF(POLICY CMP0043)
    10 
    11 IF(POLICY CMP0026)
    12   #This is for copying the dll's needed by glpk (in lp_test and mip_test)
    13   CMAKE_POLICY(SET CMP0026 OLD) 
    14 ENDIF(POLICY CMP0026)
    15 
    16 SET(PROJECT_NAME "LEMON")
    17 PROJECT(${PROJECT_NAME})
    18 
    19 INCLUDE(FindPythonInterp)
    20 INCLUDE(FindWget)
    21 
    22 IF(EXISTS ${PROJECT_SOURCE_DIR}/cmake/version.cmake)
    23   INCLUDE(${PROJECT_SOURCE_DIR}/cmake/version.cmake)
    24 ELSEIF(DEFINED ENV{LEMON_VERSION})
    25   SET(LEMON_VERSION $ENV{LEMON_VERSION} CACHE STRING "LEMON version string.")
    26 ELSE()
    27   EXECUTE_PROCESS(
    28     COMMAND
    29     hg log -r. --template "{latesttag}"
    30     WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
    31     OUTPUT_VARIABLE HG_REVISION_TAG
    32     ERROR_QUIET
    33     OUTPUT_STRIP_TRAILING_WHITESPACE
    34   )
    35   EXECUTE_PROCESS(
    36     COMMAND
    37     hg log -r. --template "{latesttagdistance}"
    38     WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
    39     OUTPUT_VARIABLE HG_REVISION_DIST
    40     ERROR_QUIET
    41     OUTPUT_STRIP_TRAILING_WHITESPACE
    42   )
    43   EXECUTE_PROCESS(
    44     COMMAND
    45     hg log -r. --template "{node|short}"
    46     WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
    47     OUTPUT_VARIABLE HG_REVISION_ID
    48     ERROR_QUIET
    49     OUTPUT_STRIP_TRAILING_WHITESPACE
    50   )
    51 
    52   IF(HG_REVISION_TAG STREQUAL "")
    53     SET(HG_REVISION_ID "hg-tip")
    54   ELSE()
    55     IF(HG_REVISION_TAG STREQUAL "null")
    56       SET(HG_REVISION_TAG "trunk")
    57     ELSEIF(HG_REVISION_TAG MATCHES "^r")
    58       STRING(SUBSTRING ${HG_REVISION_TAG} 1 -1 HG_REVISION_TAG)
    59     ENDIF()
    60     IF(HG_REVISION_DIST STREQUAL "0")
    61       SET(HG_REVISION ${HG_REVISION_TAG})
    62     ELSE()
    63       SET(HG_REVISION
    64 	"${HG_REVISION_TAG}+${HG_REVISION_DIST}-${HG_REVISION_ID}")
    65     ENDIF()
    66   ENDIF()
    67 
    68   SET(LEMON_VERSION ${HG_REVISION} CACHE STRING "LEMON version string.")
    69 ENDIF()
    70 
    71 SET(PROJECT_VERSION ${LEMON_VERSION})
    72 
    73 SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
    74 
    75 FIND_PACKAGE(Doxygen)
    76 FIND_PACKAGE(Ghostscript)
    77 
    78 IF(WIN32)
    79   SET(LEMON_WIN32 TRUE)
    80 ENDIF(WIN32)
    81 
    82 SET(LEMON_ENABLE_GLPK YES CACHE STRING "Enable GLPK solver backend.")
    83 SET(LEMON_ENABLE_ILOG YES CACHE STRING "Enable ILOG (CPLEX) solver backend.")
    84 SET(LEMON_ENABLE_COIN YES CACHE STRING "Enable COIN solver backend.")
    85 SET(LEMON_ENABLE_SOPLEX YES CACHE STRING "Enable SoPlex solver backend.")
    86 
    87 IF(LEMON_ENABLE_GLPK) 
    88   FIND_PACKAGE(GLPK 4.33)
    89   IF(GLPK_FOUND)
    90     SET(LEMON_HAVE_LP TRUE)
    91     SET(LEMON_HAVE_MIP TRUE)
    92     SET(LEMON_HAVE_GLPK TRUE)
    93   ENDIF(GLPK_FOUND)
    94 ENDIF(LEMON_ENABLE_GLPK)
    95 IF(LEMON_ENABLE_ILOG)
    96   FIND_PACKAGE(ILOG)
    97   IF(ILOG_FOUND)
    98     SET(LEMON_HAVE_LP TRUE)
    99     SET(LEMON_HAVE_MIP TRUE)
   100     SET(LEMON_HAVE_CPLEX TRUE)
   101   ENDIF(ILOG_FOUND)
   102 ENDIF(LEMON_ENABLE_ILOG)
   103 IF(LEMON_ENABLE_COIN)
   104   FIND_PACKAGE(COIN)
   105   IF(COIN_FOUND)
   106     SET(LEMON_HAVE_LP TRUE)
   107     SET(LEMON_HAVE_MIP TRUE)
   108     SET(LEMON_HAVE_CLP TRUE)
   109     SET(LEMON_HAVE_CBC TRUE)
   110   ENDIF(COIN_FOUND)
   111 ENDIF(LEMON_ENABLE_COIN)
   112 IF(LEMON_ENABLE_SOPLEX)
   113   FIND_PACKAGE(SOPLEX)
   114   IF(SOPLEX_FOUND)
   115     SET(LEMON_HAVE_LP TRUE)
   116     SET(LEMON_HAVE_SOPLEX TRUE)
   117   ENDIF(SOPLEX_FOUND)
   118 ENDIF(LEMON_ENABLE_SOPLEX)
   119 
   120 IF(ILOG_FOUND)
   121   SET(DEFAULT_LP "CPLEX")
   122   SET(DEFAULT_MIP "CPLEX")
   123 ELSEIF(COIN_FOUND)
   124   SET(DEFAULT_LP "CLP")
   125   SET(DEFAULT_MIP "CBC")
   126 ELSEIF(GLPK_FOUND)
   127   SET(DEFAULT_LP "GLPK")
   128   SET(DEFAULT_MIP "GLPK")
   129 ELSEIF(SOPLEX_FOUND)
   130   SET(DEFAULT_LP "SOPLEX")
   131 ENDIF()
   132 
   133 IF(NOT LEMON_DEFAULT_LP OR
   134     (NOT ILOG_FOUND AND (LEMON_DEFAULT_LP STREQUAL "CPLEX")) OR
   135     (NOT COIN_FOUND AND (LEMON_DEFAULT_LP STREQUAL "CLP")) OR
   136     (NOT GLPK_FOUND AND (LEMON_DEFAULT_LP STREQUAL "GLPK")) OR
   137     (NOT SOPLEX_FOUND AND (LEMON_DEFAULT_LP STREQUAL "SOPLEX")))
   138   SET(LEMON_DEFAULT_LP ${DEFAULT_LP} CACHE STRING
   139     "Default LP solver backend (GLPK, CPLEX, CLP or SOPLEX)" FORCE)
   140 ELSE()
   141   SET(LEMON_DEFAULT_LP ${DEFAULT_LP} CACHE STRING
   142     "Default LP solver backend (GLPK, CPLEX, CLP or SOPLEX)")
   143 ENDIF()
   144 IF(NOT LEMON_DEFAULT_MIP OR
   145     (NOT ILOG_FOUND AND (LEMON_DEFAULT_MIP STREQUAL "CPLEX")) OR
   146     (NOT COIN_FOUND AND (LEMON_DEFAULT_MIP STREQUAL "CBC")) OR
   147     (NOT GLPK_FOUND AND (LEMON_DEFAULT_MIP STREQUAL "GLPK")))
   148   SET(LEMON_DEFAULT_MIP ${DEFAULT_MIP} CACHE STRING
   149     "Default MIP solver backend (GLPK, CPLEX or CBC)" FORCE)
   150 ELSE()
   151   SET(LEMON_DEFAULT_MIP ${DEFAULT_MIP} CACHE STRING
   152     "Default MIP solver backend (GLPK, CPLEX or CBC)")
   153 ENDIF()
   154 
   155 
   156 IF(DEFINED ENV{LEMON_CXX_WARNING})
   157   SET(CXX_WARNING $ENV{LEMON_CXX_WARNING})
   158 ELSE()
   159   IF(CMAKE_COMPILER_IS_GNUCXX)
   160     SET(CXX_WARNING "-Wall -W -Wunused -Wformat=2 -Wctor-dtor-privacy -Wnon-virtual-dtor -Wno-char-subscripts -Wwrite-strings -Wno-char-subscripts -Wreturn-type -Wcast-qual -Wcast-align -Wsign-promo -Woverloaded-virtual -fno-strict-aliasing -Wold-style-cast -Wno-unknown-pragmas")
   161     SET(CMAKE_CXX_FLAGS_DEBUG CACHE STRING "-ggdb")
   162     SET(CMAKE_C_FLAGS_DEBUG CACHE STRING "-ggdb")
   163   ELSEIF(MSVC)
   164     # This part is unnecessary 'casue the same is set by the lemon/core.h.
   165     # Still kept as an example.
   166 
   167     # SET(CXX_WARNING "/wd4250 /wd4267 /wd4355 /wd4503 /wd4800 /wd4996")
   168 
   169     # Suppressed warnings:
   170     # C4250: 'class1' : inherits 'class2::member' via dominance
   171     # C4267: conversion from 'size_t' to 'type', possible loss of data
   172     # C4355: 'this' : used in base member initializer list
   173     # C4503: 'function' : decorated name length exceeded, name was truncated
   174     # C4800: 'type' : forcing value to bool 'true' or 'false'
   175     #        (performance warning)
   176     # C4996: 'function': was declared deprecated
   177   ELSE()
   178     SET(CXX_WARNING "-Wall")
   179   ENDIF()
   180 ENDIF()
   181 SET(LEMON_CXX_WARNING_FLAGS ${CXX_WARNING} CACHE STRING "LEMON warning flags.")
   182 
   183 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LEMON_CXX_WARNING_FLAGS}")
   184 
   185 IF(MSVC)
   186   SET(CMAKE_CXX_FLAGS "/bigobj ${CMAKE_CXX_FLAGS}")
   187   SET( CMAKE_CXX_FLAGS_MAINTAINER "/WX ${CMAKE_CXX_FLAGS_DEBUG}" CACHE STRING
   188     "Flags used by the C++ compiler during maintainer builds."
   189     )
   190   SET( CMAKE_C_FLAGS_MAINTAINER "/WX ${CMAKE_CXX_FLAGS_DEBUG}" CACHE STRING
   191     "Flags used by the C compiler during maintainer builds."
   192     )
   193   SET( CMAKE_EXE_LINKER_FLAGS_MAINTAINER
   194     "${CMAKE_EXE_LINKER_FLAGS_DEBUG}" CACHE STRING
   195     "Flags used for linking binaries during maintainer builds."
   196     )
   197   SET( CMAKE_SHARED_LINKER_FLAGS_MAINTAINER
   198     "${CMAKE_SHARED_LINKER_FLAGS_DEBUG}" CACHE STRING
   199     "Flags used by the shared libraries linker during maintainer builds."
   200     )
   201 ELSE()
   202   SET( CMAKE_CXX_FLAGS_MAINTAINER "-Werror -ggdb -O0" CACHE STRING
   203     "Flags used by the C++ compiler during maintainer builds."
   204     )
   205   SET( CMAKE_C_FLAGS_MAINTAINER "-Werror -O0" CACHE STRING
   206     "Flags used by the C compiler during maintainer builds."
   207     )
   208   SET( CMAKE_EXE_LINKER_FLAGS_MAINTAINER
   209     "${CMAKE_EXE_LINKER_FLAGS_DEBUG}" CACHE STRING
   210     "Flags used for linking binaries during maintainer builds."
   211     )
   212   SET( CMAKE_SHARED_LINKER_FLAGS_MAINTAINER
   213     "${CMAKE_SHARED_LINKER_FLAGS_DEBUG}" CACHE STRING
   214     "Flags used by the shared libraries linker during maintainer builds."
   215     )
   216 ENDIF()
   217 
   218 MARK_AS_ADVANCED(
   219     CMAKE_CXX_FLAGS_MAINTAINER
   220     CMAKE_C_FLAGS_MAINTAINER
   221     CMAKE_EXE_LINKER_FLAGS_MAINTAINER
   222     CMAKE_SHARED_LINKER_FLAGS_MAINTAINER )
   223 
   224 IF(CMAKE_CONFIGURATION_TYPES)
   225   LIST(APPEND CMAKE_CONFIGURATION_TYPES Maintainer)
   226   LIST(REMOVE_DUPLICATES CMAKE_CONFIGURATION_TYPES)
   227   SET(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING
   228       "Add the configurations that we need"
   229       FORCE)
   230  endif()
   231 
   232 IF(NOT CMAKE_BUILD_TYPE)
   233   SET(CMAKE_BUILD_TYPE "Release")
   234 ENDIF()
   235 
   236 SET( CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING
   237     "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel Maintainer."
   238     FORCE )
   239 
   240 SET_DIRECTORY_PROPERTIES(PROPERTIES
   241   COMPILE_DEFINITIONS_DEBUG "LEMON_ENABLE_DEBUG"
   242   COMPILE_DEFINITIONS_MAINTAINER "LEMON_ENABLE_DEBUG"
   243 )
   244 
   245 INCLUDE(CheckTypeSize)
   246 CHECK_TYPE_SIZE("long long" LONG_LONG)
   247 SET(LEMON_HAVE_LONG_LONG ${HAVE_LONG_LONG})
   248 
   249 INCLUDE(FindThreads)
   250 
   251 IF(NOT LEMON_THREADING)
   252   IF(CMAKE_USE_PTHREADS_INIT)
   253     SET(LEMON_THREADING "Pthread")
   254   ELSEIF(CMAKE_USE_WIN32_THREADS_INIT)
   255     SET(LEMON_THREADING "Win32")
   256   ELSE()
   257     SET(LEMON_THREADING "None")
   258   ENDIF()
   259 ENDIF()
   260 
   261 SET( LEMON_THREADING "${LEMON_THREADING}" CACHE STRING
   262   "Choose the threading library, options are: Pthread Win32 None."
   263   FORCE )
   264 
   265 IF(LEMON_THREADING STREQUAL "Pthread")
   266   SET(LEMON_USE_PTHREAD TRUE)
   267 ELSEIF(LEMON_THREADING STREQUAL "Win32")
   268   SET(LEMON_USE_WIN32_THREADS TRUE)
   269 ENDIF()
   270 
   271 ENABLE_TESTING()
   272 
   273 
   274 INCLUDE(CheckCXXCompilerFlag)
   275 CHECK_CXX_COMPILER_FLAG("-std=c++11" LEMON_CXX11)
   276 IF(LEMON_CXX11)
   277   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
   278 ENDIF()
   279 
   280 
   281 IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer")
   282   ADD_CUSTOM_TARGET(check ALL COMMAND ${CMAKE_CTEST_COMMAND})
   283 ELSE()
   284   ADD_CUSTOM_TARGET(check COMMAND ${CMAKE_CTEST_COMMAND})
   285 ENDIF()
   286 
   287 ADD_SUBDIRECTORY(lemon)
   288 IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
   289   ADD_SUBDIRECTORY(contrib)
   290   ADD_SUBDIRECTORY(demo)
   291   ADD_SUBDIRECTORY(tools)
   292   ADD_SUBDIRECTORY(doc)
   293   ADD_SUBDIRECTORY(test)
   294 ENDIF()
   295 
   296 CONFIGURE_FILE(
   297   ${PROJECT_SOURCE_DIR}/cmake/LEMONConfig.cmake.in
   298   ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake
   299   @ONLY
   300 )
   301 IF(UNIX)
   302   INSTALL(
   303     FILES ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake
   304     DESTINATION share/lemon/cmake
   305   )
   306 ELSEIF(WIN32)
   307   INSTALL(
   308     FILES ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake
   309     DESTINATION cmake
   310   )
   311 ENDIF()
   312 
   313 CONFIGURE_FILE(
   314   ${PROJECT_SOURCE_DIR}/cmake/version.cmake.in
   315   ${PROJECT_BINARY_DIR}/cmake/version.cmake
   316   @ONLY
   317 )
   318 
   319 SET(ARCHIVE_BASE_NAME ${CMAKE_PROJECT_NAME})
   320 STRING(TOLOWER ${ARCHIVE_BASE_NAME} ARCHIVE_BASE_NAME)
   321 SET(ARCHIVE_NAME ${ARCHIVE_BASE_NAME}-${PROJECT_VERSION})
   322 ADD_CUSTOM_TARGET(dist
   323   COMMAND cmake -E remove_directory ${ARCHIVE_NAME}
   324   COMMAND hg archive ${ARCHIVE_NAME}
   325   COMMAND cmake -E copy cmake/version.cmake ${ARCHIVE_NAME}/cmake/version.cmake
   326   COMMAND tar -czf ${ARCHIVE_BASE_NAME}-nodoc-${PROJECT_VERSION}.tar.gz ${ARCHIVE_NAME}
   327   COMMAND zip -r ${ARCHIVE_BASE_NAME}-nodoc-${PROJECT_VERSION}.zip ${ARCHIVE_NAME}
   328   COMMAND cmake -E copy_directory doc/html ${ARCHIVE_NAME}/doc/html
   329   COMMAND tar -czf ${ARCHIVE_NAME}.tar.gz ${ARCHIVE_NAME}
   330   COMMAND zip -r ${ARCHIVE_NAME}.zip ${ARCHIVE_NAME}
   331   COMMAND cmake -E copy_directory doc/html ${ARCHIVE_BASE_NAME}-doc-${PROJECT_VERSION}
   332   COMMAND tar -czf ${ARCHIVE_BASE_NAME}-doc-${PROJECT_VERSION}.tar.gz ${ARCHIVE_BASE_NAME}-doc-${PROJECT_VERSION}
   333   COMMAND zip -r ${ARCHIVE_BASE_NAME}-doc-${PROJECT_VERSION}.zip ${ARCHIVE_BASE_NAME}-doc-${PROJECT_VERSION}
   334   COMMAND cmake -E remove_directory ${ARCHIVE_NAME}
   335   COMMAND cmake -E remove_directory ${ARCHIVE_BASE_NAME}-doc-${PROJECT_VERSION}
   336   DEPENDS html
   337   WORKING_DIRECTORY ${PROJECT_BINARY_DIR})
   338 
   339 # CPACK config (Basically for NSIS)
   340 IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
   341   SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
   342   SET(CPACK_PACKAGE_VENDOR "EGRES")
   343   SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY
   344     "LEMON - Library for Efficient Modeling and Optimization in Networks")
   345   SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
   346 
   347   SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
   348 
   349   SET(CPACK_PACKAGE_INSTALL_DIRECTORY
   350     "${PROJECT_NAME} ${PROJECT_VERSION}")
   351   SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY
   352     "${PROJECT_NAME} ${PROJECT_VERSION}")
   353 
   354   SET(CPACK_COMPONENTS_ALL headers library html_documentation bin)
   355 
   356   SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers")
   357   SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Dynamic-link library")
   358   SET(CPACK_COMPONENT_BIN_DISPLAY_NAME "Command line utilities")
   359   SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation")
   360 
   361   SET(CPACK_COMPONENT_HEADERS_DESCRIPTION
   362     "C++ header files")
   363   SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION
   364     "DLL and import library")
   365   SET(CPACK_COMPONENT_BIN_DESCRIPTION
   366     "Command line utilities")
   367   SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION
   368     "Doxygen generated documentation")
   369 
   370   SET(CPACK_COMPONENT_HEADERS_DEPENDS library)
   371 
   372   SET(CPACK_COMPONENT_HEADERS_GROUP "Development")
   373   SET(CPACK_COMPONENT_LIBRARY_GROUP "Development")
   374   SET(CPACK_COMPONENT_HTML_DOCUMENTATION_GROUP "Documentation")
   375 
   376   SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION
   377     "Components needed to develop software using LEMON")
   378   SET(CPACK_COMPONENT_GROUP_DOCUMENTATION_DESCRIPTION
   379     "Documentation of LEMON")
   380 
   381   SET(CPACK_ALL_INSTALL_TYPES Full Developer)
   382 
   383   SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full)
   384   SET(CPACK_COMPONENT_LIBRARY_INSTALL_TYPES Developer Full)
   385   SET(CPACK_COMPONENT_HTML_DOCUMENTATION_INSTALL_TYPES Full)
   386 
   387   SET(CPACK_GENERATOR "NSIS")
   388   SET(CPACK_NSIS_MUI_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis/lemon.ico")
   389   SET(CPACK_NSIS_MUI_UNIICON "${PROJECT_SOURCE_DIR}/cmake/nsis/uninstall.ico")
   390   #SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis\\\\installer.bmp")
   391   SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\lemon.ico")
   392   SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} ${PROJECT_NAME}")
   393   SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\lemon.cs.elte.hu")
   394   SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\lemon.cs.elte.hu")
   395   SET(CPACK_NSIS_CONTACT "lemon-user@lemon.cs.elte.hu")
   396   SET(CPACK_NSIS_CREATE_ICONS_EXTRA "
   397     CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation.lnk\\\" \\\"$INSTDIR\\\\share\\\\doc\\\\index.html\\\"
   398     ")
   399   SET(CPACK_NSIS_DELETE_ICONS_EXTRA "
   400     !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
   401     Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Documentation.lnk\\\"
   402     ")
   403 
   404   INCLUDE(CPack)
   405 ENDIF()