author | Alpar Juttner <alpar@cs.elte.hu> |
Tue, 16 Sep 2008 16:07:35 +0100 | |
changeset 262 | 0181b7f12a2a |
parent 225 | c5a40fc54f1a |
child 274 | 2a33883915bb |
permissions | -rw-r--r-- |
alpar@225 | 1 |
CMAKE_MINIMUM_REQUIRED(VERSION 2.6) |
alpar@225 | 2 |
|
alpar@225 | 3 |
#EXECUTE_PROCESS( |
alpar@225 | 4 |
# COMMAND hg id -i |
alpar@225 | 5 |
# OUTPUT_VARIABLE HG_REVISION |
alpar@225 | 6 |
# OUTPUT_STRIP_TRAILING_WHITESPACE) |
alpar@225 | 7 |
|
ladanyi@236 | 8 |
SET(PROJECT_NAME "LEMON") |
alpar@225 | 9 |
SET(PROJECT_VERSION_MAJOR "0") |
alpar@225 | 10 |
SET(PROJECT_VERSION_MINOR "99") |
alpar@225 | 11 |
SET(PROJECT_VERSION_PATCH "0") |
alpar@225 | 12 |
SET(PROJECT_VERSION |
alpar@225 | 13 |
"${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") |
alpar@225 | 14 |
|
alpar@225 | 15 |
PROJECT(${PROJECT_NAME}) |
alpar@225 | 16 |
|
alpar@225 | 17 |
SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) |
alpar@225 | 18 |
|
alpar@225 | 19 |
INCLUDE(FindDoxygen) |
alpar@225 | 20 |
INCLUDE(FindGhostscript) |
alpar@225 | 21 |
|
alpar@225 | 22 |
ENABLE_TESTING() |
alpar@225 | 23 |
|
alpar@225 | 24 |
ADD_SUBDIRECTORY(lemon) |
alpar@225 | 25 |
ADD_SUBDIRECTORY(demo) |
alpar@225 | 26 |
ADD_SUBDIRECTORY(doc) |
alpar@225 | 27 |
ADD_SUBDIRECTORY(test) |
alpar@225 | 28 |
|
alpar@225 | 29 |
IF(WIN32) |
alpar@225 | 30 |
INSTALL(FILES ${CMAKE_SOURCE_DIR}/cmake/nsis/lemon.ico |
alpar@225 | 31 |
DESTINATION bin) |
alpar@225 | 32 |
ENDIF(WIN32) |
alpar@225 | 33 |
|
alpar@225 | 34 |
IF(WIN32) |
alpar@225 | 35 |
SET(CPACK_PACKAGE_NAME ${PROJECT_NAME}) |
alpar@225 | 36 |
SET(CPACK_PACKAGE_VENDOR |
alpar@225 | 37 |
"EGRES - Egervary Research Group on Combinatorial Optimization") |
alpar@225 | 38 |
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY |
ladanyi@236 | 39 |
"LEMON - Library of Efficient Models and Optimization in Networks") |
alpar@225 | 40 |
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE") |
alpar@225 | 41 |
|
alpar@225 | 42 |
SET(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) |
alpar@225 | 43 |
SET(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR}) |
alpar@225 | 44 |
SET(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH}) |
alpar@225 | 45 |
SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) |
alpar@225 | 46 |
|
alpar@225 | 47 |
SET(CPACK_PACKAGE_INSTALL_DIRECTORY |
alpar@225 | 48 |
"${PROJECT_NAME} ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}") |
alpar@225 | 49 |
SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY |
alpar@225 | 50 |
"${PROJECT_NAME} ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") |
alpar@225 | 51 |
|
alpar@225 | 52 |
# Variables to generate a component-based installer. |
alpar@225 | 53 |
#SET(CPACK_COMPONENTS_ALL headers library html_documentation) |
alpar@225 | 54 |
|
alpar@225 | 55 |
#SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers") |
alpar@225 | 56 |
#SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Static library") |
alpar@225 | 57 |
#SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation") |
alpar@225 | 58 |
|
alpar@225 | 59 |
#SET(CPACK_COMPONENT_HEADERS_DESCRIPTION |
ladanyi@236 | 60 |
# "C++ header files for use with the LEMON library") |
alpar@225 | 61 |
#SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION |
ladanyi@236 | 62 |
# "Static library used to build programs with LEMON") |
alpar@225 | 63 |
#SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION |
alpar@225 | 64 |
# "Doxygen generated documentation") |
alpar@225 | 65 |
|
alpar@225 | 66 |
#SET(CPACK_COMPONENT_HEADERS_DEPENDS library) |
alpar@225 | 67 |
|
alpar@225 | 68 |
#SET(CPACK_COMPONENT_HEADERS_GROUP "Development") |
alpar@225 | 69 |
#SET(CPACK_COMPONENT_LIBRARY_GROUP "Development") |
alpar@225 | 70 |
#SET(CPACK_COMPONENT_HTML_DOCUMENTATION_GROUP "Documentation") |
alpar@225 | 71 |
|
alpar@225 | 72 |
#SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION |
ladanyi@236 | 73 |
# "Components needed to develop software using LEMON") |
alpar@225 | 74 |
#SET(CPACK_COMPONENT_GROUP_DOCUMENTATION_DESCRIPTION |
ladanyi@236 | 75 |
# "Documentation of LEMON") |
alpar@225 | 76 |
|
alpar@225 | 77 |
#SET(CPACK_ALL_INSTALL_TYPES Full Developer) |
alpar@225 | 78 |
|
alpar@225 | 79 |
#SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full) |
alpar@225 | 80 |
#SET(CPACK_COMPONENT_LIBRARY_INSTALL_TYPES Developer Full) |
alpar@225 | 81 |
#SET(CPACK_COMPONENT_HTML_DOCUMENTATION_INSTALL_TYPES Full) |
alpar@225 | 82 |
|
alpar@225 | 83 |
SET(CPACK_GENERATOR "NSIS") |
alpar@225 | 84 |
SET(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis/lemon.ico") |
alpar@225 | 85 |
SET(CPACK_NSIS_MUI_UNIICON "${CMAKE_SOURCE_DIR}/cmake/nsis/uninstall.ico") |
alpar@225 | 86 |
#SET(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis\\\\installer.bmp") |
alpar@225 | 87 |
SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\lemon.ico") |
alpar@225 | 88 |
SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} ${PROJECT_NAME}") |
alpar@225 | 89 |
SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\lemon.cs.elte.hu") |
alpar@225 | 90 |
SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\lemon.cs.elte.hu") |
alpar@225 | 91 |
SET(CPACK_NSIS_CONTACT "lemon-user@lemon.cs.elte.hu") |
alpar@225 | 92 |
SET(CPACK_NSIS_CREATE_ICONS_EXTRA " |
alpar@225 | 93 |
CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation.lnk\\\" \\\"$INSTDIR\\\\doc\\\\index.html\\\" |
alpar@225 | 94 |
") |
alpar@225 | 95 |
SET(CPACK_NSIS_DELETE_ICONS_EXTRA " |
alpar@225 | 96 |
!insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP |
alpar@225 | 97 |
Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Documentation.lnk\\\" |
alpar@225 | 98 |
") |
alpar@225 | 99 |
|
alpar@225 | 100 |
INCLUDE(CPack) |
alpar@225 | 101 |
ENDIF(WIN32) |