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