COIN-OR::LEMON - Graph Library

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

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

Fix the check for the 'long long' type

File size: 4.1 KB
Line 
1CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
2
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)
9
10PROJECT(${PROJECT_NAME})
11
12SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
13
14INCLUDE(FindDoxygen)
15INCLUDE(FindGhostscript)
16FIND_PACKAGE(GLPK 4.33)
17FIND_PACKAGE(CPLEX)
18FIND_PACKAGE(COIN)
19
20INCLUDE(CheckTypeSize)
21CHECK_TYPE_SIZE("long long" LONG_LONG)
22SET(LEMON_HAVE_LONG_LONG ${HAVE_LONG_LONG})
23
24ENABLE_TESTING()
25
26ADD_SUBDIRECTORY(lemon)
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})
33
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
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
56      "LEMON - Library for Efficient Modeling and Optimization in Networks")
57    SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
58
59    SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
60
61    SET(CPACK_PACKAGE_INSTALL_DIRECTORY
62      "${PROJECT_NAME} ${PROJECT_VERSION}")
63    SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY
64      "${PROJECT_NAME} ${PROJECT_VERSION}")
65
66    SET(CPACK_COMPONENTS_ALL headers library html_documentation bin)
67
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")
72
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")
81
82    SET(CPACK_COMPONENT_HEADERS_DEPENDS library)
83
84    SET(CPACK_COMPONENT_HEADERS_GROUP "Development")
85    SET(CPACK_COMPONENT_LIBRARY_GROUP "Development")
86    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_GROUP "Documentation")
87
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")
92
93    SET(CPACK_ALL_INSTALL_TYPES Full Developer)
94
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)
98
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      ")
115
116    INCLUDE(CPack)
117  ENDIF(WIN32)
118ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
Note: See TracBrowser for help on using the repository browser.