1 | CMAKE_MINIMUM_REQUIRED(VERSION 2.6) |
---|
2 | |
---|
3 | SET(PROJECT_NAME "LEMON") |
---|
4 | SET(PROJECT_VERSION "hg-tip" CACHE STRING "The version string.") |
---|
5 | |
---|
6 | PROJECT(${PROJECT_NAME}) |
---|
7 | |
---|
8 | SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) |
---|
9 | |
---|
10 | INCLUDE(FindDoxygen) |
---|
11 | INCLUDE(FindGhostscript) |
---|
12 | |
---|
13 | ENABLE_TESTING() |
---|
14 | |
---|
15 | ADD_SUBDIRECTORY(lemon) |
---|
16 | ADD_SUBDIRECTORY(demo) |
---|
17 | ADD_SUBDIRECTORY(doc) |
---|
18 | ADD_SUBDIRECTORY(test) |
---|
19 | |
---|
20 | IF(WIN32) |
---|
21 | SET(CPACK_PACKAGE_NAME ${PROJECT_NAME}) |
---|
22 | SET(CPACK_PACKAGE_VENDOR "EGRES") |
---|
23 | SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY |
---|
24 | "LEMON - Library of Efficient Models and Optimization in Networks") |
---|
25 | SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE") |
---|
26 | |
---|
27 | SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) |
---|
28 | |
---|
29 | SET(CPACK_PACKAGE_INSTALL_DIRECTORY |
---|
30 | "${PROJECT_NAME} ${PROJECT_VERSION}") |
---|
31 | SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY |
---|
32 | "${PROJECT_NAME} ${PROJECT_VERSION}") |
---|
33 | |
---|
34 | SET(CPACK_COMPONENTS_ALL headers library html_documentation) |
---|
35 | |
---|
36 | SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers") |
---|
37 | SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Dynamic-link library") |
---|
38 | SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation") |
---|
39 | |
---|
40 | SET(CPACK_COMPONENT_HEADERS_DESCRIPTION |
---|
41 | "C++ header files") |
---|
42 | SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION |
---|
43 | "DLL and import library") |
---|
44 | SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION |
---|
45 | "Doxygen generated documentation") |
---|
46 | |
---|
47 | SET(CPACK_COMPONENT_HEADERS_DEPENDS library) |
---|
48 | |
---|
49 | SET(CPACK_COMPONENT_HEADERS_GROUP "Development") |
---|
50 | SET(CPACK_COMPONENT_LIBRARY_GROUP "Development") |
---|
51 | SET(CPACK_COMPONENT_HTML_DOCUMENTATION_GROUP "Documentation") |
---|
52 | |
---|
53 | SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION |
---|
54 | "Components needed to develop software using LEMON") |
---|
55 | SET(CPACK_COMPONENT_GROUP_DOCUMENTATION_DESCRIPTION |
---|
56 | "Documentation of LEMON") |
---|
57 | |
---|
58 | SET(CPACK_ALL_INSTALL_TYPES Full Developer) |
---|
59 | |
---|
60 | SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full) |
---|
61 | SET(CPACK_COMPONENT_LIBRARY_INSTALL_TYPES Developer Full) |
---|
62 | SET(CPACK_COMPONENT_HTML_DOCUMENTATION_INSTALL_TYPES Full) |
---|
63 | |
---|
64 | SET(CPACK_GENERATOR "NSIS") |
---|
65 | SET(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis/lemon.ico") |
---|
66 | SET(CPACK_NSIS_MUI_UNIICON "${CMAKE_SOURCE_DIR}/cmake/nsis/uninstall.ico") |
---|
67 | #SET(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis\\\\installer.bmp") |
---|
68 | SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\lemon.ico") |
---|
69 | SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} ${PROJECT_NAME}") |
---|
70 | SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\lemon.cs.elte.hu") |
---|
71 | SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\lemon.cs.elte.hu") |
---|
72 | SET(CPACK_NSIS_CONTACT "lemon-user@lemon.cs.elte.hu") |
---|
73 | SET(CPACK_NSIS_CREATE_ICONS_EXTRA " |
---|
74 | CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation.lnk\\\" \\\"$INSTDIR\\\\doc\\\\index.html\\\" |
---|
75 | ") |
---|
76 | SET(CPACK_NSIS_DELETE_ICONS_EXTRA " |
---|
77 | !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP |
---|
78 | Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Documentation.lnk\\\" |
---|
79 | ") |
---|
80 | |
---|
81 | INCLUDE(CPack) |
---|
82 | ENDIF(WIN32) |
---|