author | Peter Kovacs <kpeter@inf.elte.hu> |
Wed, 25 Mar 2009 21:37:50 +0100 | |
changeset 606 | c7d160f73d52 |
parent 518 | 8668e1b5dafb |
child 549 | ba659d676331 |
permissions | -rw-r--r-- |
alpar@225 | 1 |
CMAKE_MINIMUM_REQUIRED(VERSION 2.6) |
alpar@225 | 2 |
|
alpar@480 | 3 |
IF(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake) |
alpar@480 | 4 |
INCLUDE(${CMAKE_SOURCE_DIR}/cmake/version.cmake) |
alpar@480 | 5 |
ELSE(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake) |
alpar@480 | 6 |
SET(PROJECT_NAME "LEMON") |
alpar@480 | 7 |
SET(PROJECT_VERSION "hg-tip" CACHE STRING "LEMON version string.") |
alpar@480 | 8 |
ENDIF(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake) |
alpar@225 | 9 |
|
alpar@225 | 10 |
PROJECT(${PROJECT_NAME}) |
alpar@225 | 11 |
|
alpar@225 | 12 |
SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) |
alpar@225 | 13 |
|
alpar@225 | 14 |
INCLUDE(FindDoxygen) |
alpar@225 | 15 |
INCLUDE(FindGhostscript) |
ladanyi@473 | 16 |
FIND_PACKAGE(GLPK 4.33) |
ladanyi@473 | 17 |
|
ladanyi@473 | 18 |
ADD_DEFINITIONS(-DHAVE_CONFIG_H) |
ladanyi@473 | 19 |
|
alpar@477 | 20 |
IF(MSVC) |
alpar@477 | 21 |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4250 /wd4355 /wd4800 /wd4996") |
alpar@477 | 22 |
# Suppressed warnings: |
alpar@477 | 23 |
# C4250: 'class1' : inherits 'class2::member' via dominance |
alpar@477 | 24 |
# C4355: 'this' : used in base member initializer list |
alpar@477 | 25 |
# C4800: 'type' : forcing value to bool 'true' or 'false' (performance warning) |
alpar@477 | 26 |
# C4996: 'function': was declared deprecated |
alpar@477 | 27 |
ENDIF(MSVC) |
alpar@477 | 28 |
|
ladanyi@473 | 29 |
IF(GLPK_FOUND) |
ladanyi@473 | 30 |
SET(HAVE_LP TRUE) |
ladanyi@473 | 31 |
SET(HAVE_MIP TRUE) |
ladanyi@473 | 32 |
SET(HAVE_GLPK TRUE) |
ladanyi@473 | 33 |
ENDIF(GLPK_FOUND) |
alpar@225 | 34 |
|
alpar@496 | 35 |
INCLUDE(CheckTypeSize) |
alpar@496 | 36 |
CHECK_TYPE_SIZE("long long" LONG_LONG) |
alpar@496 | 37 |
|
alpar@225 | 38 |
ENABLE_TESTING() |
alpar@225 | 39 |
|
alpar@225 | 40 |
ADD_SUBDIRECTORY(lemon) |
alpar@225 | 41 |
ADD_SUBDIRECTORY(demo) |
alpar@527 | 42 |
ADD_SUBDIRECTORY(tools) |
alpar@225 | 43 |
ADD_SUBDIRECTORY(doc) |
alpar@225 | 44 |
ADD_SUBDIRECTORY(test) |
alpar@225 | 45 |
|
alpar@225 | 46 |
IF(WIN32) |
alpar@225 | 47 |
SET(CPACK_PACKAGE_NAME ${PROJECT_NAME}) |
ladanyi@479 | 48 |
SET(CPACK_PACKAGE_VENDOR "EGRES") |
alpar@225 | 49 |
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY |
ladanyi@236 | 50 |
"LEMON - Library of Efficient Models and Optimization in Networks") |
alpar@225 | 51 |
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE") |
alpar@225 | 52 |
|
alpar@225 | 53 |
SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) |
alpar@225 | 54 |
|
alpar@225 | 55 |
SET(CPACK_PACKAGE_INSTALL_DIRECTORY |
ladanyi@274 | 56 |
"${PROJECT_NAME} ${PROJECT_VERSION}") |
alpar@225 | 57 |
SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY |
ladanyi@274 | 58 |
"${PROJECT_NAME} ${PROJECT_VERSION}") |
alpar@225 | 59 |
|
alpar@527 | 60 |
SET(CPACK_COMPONENTS_ALL headers library html_documentation bin) |
alpar@225 | 61 |
|
ladanyi@479 | 62 |
SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers") |
ladanyi@479 | 63 |
SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Dynamic-link library") |
alpar@527 | 64 |
SET(CPACK_COMPONENT_BIN_DISPLAY_NAME "Command line utilities") |
ladanyi@479 | 65 |
SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation") |
alpar@225 | 66 |
|
ladanyi@479 | 67 |
SET(CPACK_COMPONENT_HEADERS_DESCRIPTION |
ladanyi@479 | 68 |
"C++ header files") |
ladanyi@479 | 69 |
SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION |
ladanyi@479 | 70 |
"DLL and import library") |
alpar@527 | 71 |
SET(CPACK_COMPONENT_BIN_DESCRIPTION |
alpar@527 | 72 |
"Command line utilities") |
ladanyi@479 | 73 |
SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION |
ladanyi@479 | 74 |
"Doxygen generated documentation") |
alpar@225 | 75 |
|
ladanyi@479 | 76 |
SET(CPACK_COMPONENT_HEADERS_DEPENDS library) |
alpar@225 | 77 |
|
ladanyi@479 | 78 |
SET(CPACK_COMPONENT_HEADERS_GROUP "Development") |
ladanyi@479 | 79 |
SET(CPACK_COMPONENT_LIBRARY_GROUP "Development") |
ladanyi@479 | 80 |
SET(CPACK_COMPONENT_HTML_DOCUMENTATION_GROUP "Documentation") |
alpar@225 | 81 |
|
ladanyi@479 | 82 |
SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION |
ladanyi@479 | 83 |
"Components needed to develop software using LEMON") |
ladanyi@479 | 84 |
SET(CPACK_COMPONENT_GROUP_DOCUMENTATION_DESCRIPTION |
ladanyi@479 | 85 |
"Documentation of LEMON") |
alpar@225 | 86 |
|
ladanyi@479 | 87 |
SET(CPACK_ALL_INSTALL_TYPES Full Developer) |
alpar@225 | 88 |
|
ladanyi@479 | 89 |
SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full) |
ladanyi@479 | 90 |
SET(CPACK_COMPONENT_LIBRARY_INSTALL_TYPES Developer Full) |
ladanyi@479 | 91 |
SET(CPACK_COMPONENT_HTML_DOCUMENTATION_INSTALL_TYPES Full) |
alpar@225 | 92 |
|
alpar@225 | 93 |
SET(CPACK_GENERATOR "NSIS") |
alpar@225 | 94 |
SET(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis/lemon.ico") |
alpar@225 | 95 |
SET(CPACK_NSIS_MUI_UNIICON "${CMAKE_SOURCE_DIR}/cmake/nsis/uninstall.ico") |
alpar@225 | 96 |
#SET(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis\\\\installer.bmp") |
alpar@225 | 97 |
SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\lemon.ico") |
alpar@225 | 98 |
SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} ${PROJECT_NAME}") |
alpar@225 | 99 |
SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\lemon.cs.elte.hu") |
alpar@225 | 100 |
SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\lemon.cs.elte.hu") |
alpar@225 | 101 |
SET(CPACK_NSIS_CONTACT "lemon-user@lemon.cs.elte.hu") |
alpar@225 | 102 |
SET(CPACK_NSIS_CREATE_ICONS_EXTRA " |
alpar@500 | 103 |
CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation.lnk\\\" \\\"$INSTDIR\\\\share\\\\doc\\\\index.html\\\" |
alpar@225 | 104 |
") |
alpar@225 | 105 |
SET(CPACK_NSIS_DELETE_ICONS_EXTRA " |
alpar@225 | 106 |
!insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP |
alpar@225 | 107 |
Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Documentation.lnk\\\" |
alpar@225 | 108 |
") |
alpar@225 | 109 |
|
alpar@225 | 110 |
INCLUDE(CPack) |
alpar@225 | 111 |
ENDIF(WIN32) |