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