COIN-OR::LEMON - Graph Library

source: lemon-main/CMakeLists.txt @ 677:a0265f621d39

Last change on this file since 677:a0265f621d39 was 677:a0265f621d39, checked in by Akos Ladanyi <ladanyi@…>, 12 years ago

Fix the check for the 'long long' type

File size: 4.1 KB
RevLine 
[225]1CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
2
[480]3IF(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake)
4  INCLUDE(${CMAKE_SOURCE_DIR}/cmake/version.cmake)
5ELSE(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake)
6  SET(PROJECT_NAME "LEMON")
7  SET(PROJECT_VERSION "hg-tip" CACHE STRING "LEMON version string.")
8ENDIF(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake)
[225]9
10PROJECT(${PROJECT_NAME})
11
[549]12SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
[225]13
14INCLUDE(FindDoxygen)
15INCLUDE(FindGhostscript)
[473]16FIND_PACKAGE(GLPK 4.33)
[620]17FIND_PACKAGE(CPLEX)
[621]18FIND_PACKAGE(COIN)
[473]19
[496]20INCLUDE(CheckTypeSize)
[677]21CHECK_TYPE_SIZE("long long" LONG_LONG)
22SET(LEMON_HAVE_LONG_LONG ${HAVE_LONG_LONG})
[496]23
[225]24ENABLE_TESTING()
25
26ADD_SUBDIRECTORY(lemon)
[549]27IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
28  ADD_SUBDIRECTORY(demo)
29  ADD_SUBDIRECTORY(tools)
30  ADD_SUBDIRECTORY(doc)
31  ADD_SUBDIRECTORY(test)
32ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
[225]33
[675]34CONFIGURE_FILE(
35  ${PROJECT_SOURCE_DIR}/cmake/LEMONConfig.cmake.in
36  ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake
37  @ONLY
38)
39IF(UNIX)
40  INSTALL(
41    FILES ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake
42    DESTINATION share/lemon/cmake
43  )
44ELSEIF(WIN32)
45  INSTALL(
46    FILES ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake
47    DESTINATION cmake
48  )
49ENDIF(UNIX)
50
[552]51IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
52  IF(WIN32)
53    SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
54    SET(CPACK_PACKAGE_VENDOR "EGRES")
55    SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY
[658]56      "LEMON - Library for Efficient Modeling and Optimization in Networks")
[552]57    SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
[225]58
[552]59    SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
[225]60
[552]61    SET(CPACK_PACKAGE_INSTALL_DIRECTORY
62      "${PROJECT_NAME} ${PROJECT_VERSION}")
63    SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY
64      "${PROJECT_NAME} ${PROJECT_VERSION}")
[225]65
[552]66    SET(CPACK_COMPONENTS_ALL headers library html_documentation bin)
[225]67
[552]68    SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers")
69    SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Dynamic-link library")
70    SET(CPACK_COMPONENT_BIN_DISPLAY_NAME "Command line utilities")
71    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation")
[225]72
[552]73    SET(CPACK_COMPONENT_HEADERS_DESCRIPTION
74      "C++ header files")
75    SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION
76      "DLL and import library")
77    SET(CPACK_COMPONENT_BIN_DESCRIPTION
78      "Command line utilities")
79    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION
80      "Doxygen generated documentation")
[225]81
[552]82    SET(CPACK_COMPONENT_HEADERS_DEPENDS library)
[225]83
[552]84    SET(CPACK_COMPONENT_HEADERS_GROUP "Development")
85    SET(CPACK_COMPONENT_LIBRARY_GROUP "Development")
86    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_GROUP "Documentation")
[225]87
[552]88    SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION
89      "Components needed to develop software using LEMON")
90    SET(CPACK_COMPONENT_GROUP_DOCUMENTATION_DESCRIPTION
91      "Documentation of LEMON")
[225]92
[552]93    SET(CPACK_ALL_INSTALL_TYPES Full Developer)
[225]94
[552]95    SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full)
96    SET(CPACK_COMPONENT_LIBRARY_INSTALL_TYPES Developer Full)
97    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_INSTALL_TYPES Full)
[225]98
[552]99    SET(CPACK_GENERATOR "NSIS")
100    SET(CPACK_NSIS_MUI_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis/lemon.ico")
101    SET(CPACK_NSIS_MUI_UNIICON "${PROJECT_SOURCE_DIR}/cmake/nsis/uninstall.ico")
102    #SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis\\\\installer.bmp")
103    SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\lemon.ico")
104    SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} ${PROJECT_NAME}")
105    SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\lemon.cs.elte.hu")
106    SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\lemon.cs.elte.hu")
107    SET(CPACK_NSIS_CONTACT "lemon-user@lemon.cs.elte.hu")
108    SET(CPACK_NSIS_CREATE_ICONS_EXTRA "
109      CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation.lnk\\\" \\\"$INSTDIR\\\\share\\\\doc\\\\index.html\\\"
110      ")
111    SET(CPACK_NSIS_DELETE_ICONS_EXTRA "
112      !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
113      Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Documentation.lnk\\\"
114      ")
[225]115
[552]116    INCLUDE(CPack)
117  ENDIF(WIN32)
118ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
Note: See TracBrowser for help on using the repository browser.