COIN-OR::LEMON - Graph Library

source: lemon-benchmark/CMakeLists.txt @ 1:4721c71fdbfc

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

Support building LEMON as a subproject

File size: 3.0 KB
Line 
1CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
2
3SET(PROJECT_NAME "LEMON-PROJECT-TEMPLATE")
4SET(PROJECT_VERSION "hg-tip"
5                    CACHE STRING "LEMON PROJECT TEMPLATE version string.")
6
7PROJECT(${PROJECT_NAME})
8
9SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
10
11IF(EXISTS ${CMAKE_SOURCE_DIR}/lemon)
12  ADD_SUBDIRECTORY(lemon)
13  SET(LEMON_INCLUDE_DIRS
14    ${CMAKE_SOURCE_DIR}/lemon
15    ${CMAKE_BINARY_DIR}/lemon
16  )
17  SET(LEMON_LIBRARIES lemon)
18ELSE()
19  FIND_PACKAGE(LEMON QUIET NO_MODULE)
20  FIND_PACKAGE(LEMON REQUIRED)
21ENDIF()
22
23FIND_PACKAGE(Doxygen)
24
25INCLUDE_DIRECTORIES(
26  ${PROJECT_SOURCE_DIR}
27  ${PROJECT_BINARY_DIR}
28  ${LEMON_INCLUDE_DIRS}
29)
30
31ADD_EXECUTABLE(lemon-project main.cc)
32TARGET_LINK_LIBRARIES(lemon-project ${LEMON_LIBRARIES})
33INSTALL(
34  TARGETS lemon-project
35  RUNTIME DESTINATION bin
36  COMPONENT bin
37)
38
39# IF(MSVC)
40#   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4250 /wd4355 /wd4503 /wd4800 /wd4996")
41# # Suppressed warnings:
42# # C4250: 'class1' : inherits 'class2::member' via dominance
43# # C4355: 'this' : used in base member initializer list
44# # C4503: 'function' : decorated name length exceeded, name was truncated
45# # C4800: 'type' : forcing value to bool 'true' or 'false' (performance warning)
46# # C4996: 'function': was declared deprecated
47# ENDIF(MSVC)
48
49ENABLE_TESTING()
50
51ADD_SUBDIRECTORY(doc)
52
53######################################################################
54# CPACK configuration
55######################################################################
56
57IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
58  SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
59  SET(CPACK_PACKAGE_VENDOR "EGRES")
60  SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY
61      "LEMON PROJECT TEMPLATE - A Template Build Environment for LEMON")
62  SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
63
64  SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
65
66  SET(CPACK_PACKAGE_INSTALL_DIRECTORY
67      "${PROJECT_NAME}")
68  SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY
69      "${PROJECT_NAME}")
70
71  SET(CPACK_COMPONENTS_ALL
72      html_documentation
73      bin)
74
75  SET(CPACK_COMPONENT_BIN_DISPLAY_NAME "Command line utilities")
76  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation")
77
78  SET(CPACK_COMPONENT_BIN_DESCRIPTION
79      "Command line utilities")
80  SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION
81      "Doxygen generated documentation")
82
83  SET(CPACK_GENERATOR "NSIS")
84  SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} ${PROJECT_NAME}")
85  SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\lemon.cs.elte.hu")
86  SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\lemon.cs.elte.hu")
87  SET(CPACK_NSIS_CONTACT "lemon-user@lemon.cs.elte.hu")
88  SET(CPACK_NSIS_CREATE_ICONS_EXTRA "
89      CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation.lnk\\\" \\\"$INSTDIR\\\\share\\\\doc\\\\index.html\\\"
90      ")
91  SET(CPACK_NSIS_DELETE_ICONS_EXTRA "
92      !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
93      Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Documentation.lnk\\\"
94      ")
95
96  INCLUDE(CPack)
97ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
Note: See TracBrowser for help on using the repository browser.