1 | CMAKE_MINIMUM_REQUIRED(VERSION 2.8) |
---|
2 | |
---|
3 | IF(POLICY CMP0048) |
---|
4 | CMAKE_POLICY(SET CMP0048 OLD) |
---|
5 | ENDIF(POLICY CMP0048) |
---|
6 | |
---|
7 | IF(POLICY CMP0043) |
---|
8 | CMAKE_POLICY(SET CMP0043 NEW) |
---|
9 | ENDIF(POLICY CMP0043) |
---|
10 | |
---|
11 | IF(POLICY CMP0026) |
---|
12 | #This is for copying the dll's needed by glpk (in lp_test and mip_test) |
---|
13 | CMAKE_POLICY(SET CMP0026 NEW) |
---|
14 | ENDIF(POLICY CMP0026) |
---|
15 | |
---|
16 | SET(PROJECT_NAME "LEMON") |
---|
17 | PROJECT(${PROJECT_NAME}) |
---|
18 | |
---|
19 | INCLUDE(FindPythonInterp) |
---|
20 | INCLUDE(FindWget) |
---|
21 | |
---|
22 | IF(EXISTS ${PROJECT_SOURCE_DIR}/cmake/version.cmake) |
---|
23 | INCLUDE(${PROJECT_SOURCE_DIR}/cmake/version.cmake) |
---|
24 | ELSEIF(DEFINED ENV{LEMON_VERSION}) |
---|
25 | SET(LEMON_VERSION $ENV{LEMON_VERSION} CACHE STRING "LEMON version string.") |
---|
26 | ELSE() |
---|
27 | EXECUTE_PROCESS( |
---|
28 | COMMAND |
---|
29 | hg log -r. --template "{latesttag}" |
---|
30 | WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} |
---|
31 | OUTPUT_VARIABLE HG_REVISION_TAG |
---|
32 | ERROR_QUIET |
---|
33 | OUTPUT_STRIP_TRAILING_WHITESPACE |
---|
34 | ) |
---|
35 | EXECUTE_PROCESS( |
---|
36 | COMMAND |
---|
37 | hg log -r. --template "{latesttagdistance}" |
---|
38 | WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} |
---|
39 | OUTPUT_VARIABLE HG_REVISION_DIST |
---|
40 | ERROR_QUIET |
---|
41 | OUTPUT_STRIP_TRAILING_WHITESPACE |
---|
42 | ) |
---|
43 | EXECUTE_PROCESS( |
---|
44 | COMMAND |
---|
45 | hg log -r. --template "{node|short}" |
---|
46 | WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} |
---|
47 | OUTPUT_VARIABLE HG_REVISION_ID |
---|
48 | ERROR_QUIET |
---|
49 | OUTPUT_STRIP_TRAILING_WHITESPACE |
---|
50 | ) |
---|
51 | |
---|
52 | IF(HG_REVISION_TAG STREQUAL "") |
---|
53 | SET(HG_REVISION_ID "hg-tip") |
---|
54 | ELSE() |
---|
55 | IF(HG_REVISION_TAG STREQUAL "null") |
---|
56 | SET(HG_REVISION_TAG "trunk") |
---|
57 | ELSEIF(HG_REVISION_TAG MATCHES "^r") |
---|
58 | STRING(SUBSTRING ${HG_REVISION_TAG} 1 -1 HG_REVISION_TAG) |
---|
59 | ENDIF() |
---|
60 | IF(HG_REVISION_DIST STREQUAL "0") |
---|
61 | SET(HG_REVISION ${HG_REVISION_TAG}) |
---|
62 | ELSE() |
---|
63 | SET(HG_REVISION |
---|
64 | "${HG_REVISION_TAG}+${HG_REVISION_DIST}-${HG_REVISION_ID}") |
---|
65 | ENDIF() |
---|
66 | ENDIF() |
---|
67 | |
---|
68 | SET(LEMON_VERSION ${HG_REVISION} CACHE STRING "LEMON version string.") |
---|
69 | ENDIF() |
---|
70 | |
---|
71 | SET(PROJECT_VERSION ${LEMON_VERSION}) |
---|
72 | |
---|
73 | SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) |
---|
74 | |
---|
75 | FIND_PACKAGE(Doxygen) |
---|
76 | FIND_PACKAGE(Ghostscript) |
---|
77 | |
---|
78 | IF(WIN32) |
---|
79 | SET(LEMON_WIN32 TRUE) |
---|
80 | ENDIF(WIN32) |
---|
81 | |
---|
82 | SET(LEMON_ENABLE_GLPK YES CACHE STRING "Enable GLPK solver backend.") |
---|
83 | SET(LEMON_ENABLE_ILOG YES CACHE STRING "Enable ILOG (CPLEX) solver backend.") |
---|
84 | SET(LEMON_ENABLE_COIN YES CACHE STRING "Enable COIN solver backend.") |
---|
85 | SET(LEMON_ENABLE_SOPLEX YES CACHE STRING "Enable SoPlex solver backend.") |
---|
86 | |
---|
87 | IF(LEMON_ENABLE_GLPK) |
---|
88 | FIND_PACKAGE(GLPK 4.33) |
---|
89 | IF(GLPK_FOUND) |
---|
90 | SET(LEMON_HAVE_LP TRUE) |
---|
91 | SET(LEMON_HAVE_MIP TRUE) |
---|
92 | SET(LEMON_HAVE_GLPK TRUE) |
---|
93 | ENDIF(GLPK_FOUND) |
---|
94 | ENDIF(LEMON_ENABLE_GLPK) |
---|
95 | IF(LEMON_ENABLE_ILOG) |
---|
96 | FIND_PACKAGE(ILOG) |
---|
97 | IF(ILOG_FOUND) |
---|
98 | SET(LEMON_HAVE_LP TRUE) |
---|
99 | SET(LEMON_HAVE_MIP TRUE) |
---|
100 | SET(LEMON_HAVE_CPLEX TRUE) |
---|
101 | ENDIF(ILOG_FOUND) |
---|
102 | ENDIF(LEMON_ENABLE_ILOG) |
---|
103 | IF(LEMON_ENABLE_COIN) |
---|
104 | FIND_PACKAGE(COIN) |
---|
105 | IF(COIN_FOUND) |
---|
106 | SET(LEMON_HAVE_LP TRUE) |
---|
107 | SET(LEMON_HAVE_MIP TRUE) |
---|
108 | SET(LEMON_HAVE_CLP TRUE) |
---|
109 | SET(LEMON_HAVE_CBC TRUE) |
---|
110 | ENDIF(COIN_FOUND) |
---|
111 | ENDIF(LEMON_ENABLE_COIN) |
---|
112 | IF(LEMON_ENABLE_SOPLEX) |
---|
113 | FIND_PACKAGE(SOPLEX) |
---|
114 | IF(SOPLEX_FOUND) |
---|
115 | SET(LEMON_HAVE_LP TRUE) |
---|
116 | SET(LEMON_HAVE_SOPLEX TRUE) |
---|
117 | ENDIF(SOPLEX_FOUND) |
---|
118 | ENDIF(LEMON_ENABLE_SOPLEX) |
---|
119 | |
---|
120 | IF(ILOG_FOUND) |
---|
121 | SET(DEFAULT_LP "CPLEX") |
---|
122 | SET(DEFAULT_MIP "CPLEX") |
---|
123 | ELSEIF(COIN_FOUND) |
---|
124 | SET(DEFAULT_LP "CLP") |
---|
125 | SET(DEFAULT_MIP "CBC") |
---|
126 | ELSEIF(GLPK_FOUND) |
---|
127 | SET(DEFAULT_LP "GLPK") |
---|
128 | SET(DEFAULT_MIP "GLPK") |
---|
129 | ELSEIF(SOPLEX_FOUND) |
---|
130 | SET(DEFAULT_LP "SOPLEX") |
---|
131 | ENDIF() |
---|
132 | |
---|
133 | IF(NOT LEMON_DEFAULT_LP OR |
---|
134 | (NOT ILOG_FOUND AND (LEMON_DEFAULT_LP STREQUAL "CPLEX")) OR |
---|
135 | (NOT COIN_FOUND AND (LEMON_DEFAULT_LP STREQUAL "CLP")) OR |
---|
136 | (NOT GLPK_FOUND AND (LEMON_DEFAULT_LP STREQUAL "GLPK")) OR |
---|
137 | (NOT SOPLEX_FOUND AND (LEMON_DEFAULT_LP STREQUAL "SOPLEX"))) |
---|
138 | SET(LEMON_DEFAULT_LP ${DEFAULT_LP} CACHE STRING |
---|
139 | "Default LP solver backend (GLPK, CPLEX, CLP or SOPLEX)" FORCE) |
---|
140 | ELSE() |
---|
141 | SET(LEMON_DEFAULT_LP ${DEFAULT_LP} CACHE STRING |
---|
142 | "Default LP solver backend (GLPK, CPLEX, CLP or SOPLEX)") |
---|
143 | ENDIF() |
---|
144 | IF(NOT LEMON_DEFAULT_MIP OR |
---|
145 | (NOT ILOG_FOUND AND (LEMON_DEFAULT_MIP STREQUAL "CPLEX")) OR |
---|
146 | (NOT COIN_FOUND AND (LEMON_DEFAULT_MIP STREQUAL "CBC")) OR |
---|
147 | (NOT GLPK_FOUND AND (LEMON_DEFAULT_MIP STREQUAL "GLPK"))) |
---|
148 | SET(LEMON_DEFAULT_MIP ${DEFAULT_MIP} CACHE STRING |
---|
149 | "Default MIP solver backend (GLPK, CPLEX or CBC)" FORCE) |
---|
150 | ELSE() |
---|
151 | SET(LEMON_DEFAULT_MIP ${DEFAULT_MIP} CACHE STRING |
---|
152 | "Default MIP solver backend (GLPK, CPLEX or CBC)") |
---|
153 | ENDIF() |
---|
154 | |
---|
155 | IF( ( ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") AND |
---|
156 | ("${CMAKE_CXX_COMPILER_VERSION}" VERSION_GREATER_EQUAL "4.8") ) |
---|
157 | OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") |
---|
158 | OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") |
---|
159 | ) |
---|
160 | SET(LEMON_NO_UNUSED_LOCAL_TYPEDEF_WARNINGS TRUE) |
---|
161 | ENDIF() |
---|
162 | |
---|
163 | IF(DEFINED ENV{LEMON_CXX_WARNING}) |
---|
164 | SET(CXX_WARNING $ENV{LEMON_CXX_WARNING}) |
---|
165 | ELSE() |
---|
166 | IF( ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") |
---|
167 | OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") |
---|
168 | ) |
---|
169 | SET(CXX_WARNING "-Wall -W -Wunused -Wformat=2 -Wctor-dtor-privacy -Wnon-virtual-dtor -Wno-char-subscripts -Wwrite-strings -Wno-char-subscripts -Wreturn-type -Wcast-qual -Wcast-align -Wsign-promo -Woverloaded-virtual -fno-strict-aliasing -Wold-style-cast -Wno-unknown-pragmas") |
---|
170 | SET(CMAKE_CXX_FLAGS_DEBUG CACHE STRING "-ggdb") |
---|
171 | SET(CMAKE_C_FLAGS_DEBUG CACHE STRING "-ggdb") |
---|
172 | ELSEIF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") |
---|
173 | SET(CXX_WARNING "-Wall -W -Wunused -Wformat=2 -Wnon-virtual-dtor -Wno-char-subscripts -Wwrite-strings -Wno-char-subscripts -Wreturn-type -Wcast-qual -Wsign-promo -Woverloaded-virtual -fno-strict-aliasing -Wno-unknown-pragmas") |
---|
174 | SET(CMAKE_CXX_FLAGS_DEBUG CACHE STRING "-ggdb") |
---|
175 | SET(CMAKE_C_FLAGS_DEBUG CACHE STRING "-ggdb") |
---|
176 | ELSEIF(MSVC) |
---|
177 | # This part is unnecessary 'casue the same is set by the lemon/core.h. |
---|
178 | # Still kept as an example. |
---|
179 | |
---|
180 | # SET(CXX_WARNING "/wd4250 /wd4267 /wd4355 /wd4503 /wd4800 /wd4996") |
---|
181 | |
---|
182 | # Suppressed warnings: |
---|
183 | # C4250: 'class1' : inherits 'class2::member' via dominance |
---|
184 | # C4267: conversion from 'size_t' to 'type', possible loss of data |
---|
185 | # C4355: 'this' : used in base member initializer list |
---|
186 | # C4503: 'function' : decorated name length exceeded, name was truncated |
---|
187 | # C4800: 'type' : forcing value to bool 'true' or 'false' |
---|
188 | # (performance warning) |
---|
189 | # C4996: 'function': was declared deprecated |
---|
190 | ELSE() |
---|
191 | SET(CXX_WARNING "-Wall") |
---|
192 | ENDIF() |
---|
193 | ENDIF() |
---|
194 | SET(LEMON_CXX_WARNING_FLAGS ${CXX_WARNING} CACHE STRING "LEMON warning flags.") |
---|
195 | |
---|
196 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LEMON_CXX_WARNING_FLAGS}") |
---|
197 | |
---|
198 | IF(MSVC) |
---|
199 | SET( CMAKE_CXX_FLAGS "/bigobj ${CMAKE_CXX_FLAGS}") |
---|
200 | SET( CMAKE_CXX_FLAGS_MAINTAINER "/WX ${CMAKE_CXX_FLAGS_DEBUG}" CACHE STRING |
---|
201 | "Flags used by the C++ compiler during maintainer builds." FORCE |
---|
202 | ) |
---|
203 | SET( CMAKE_C_FLAGS_MAINTAINER "/WX ${CMAKE_CXX_FLAGS_DEBUG}" CACHE STRING |
---|
204 | "Flags used by the C compiler during maintainer builds." FORCE |
---|
205 | ) |
---|
206 | SET( CMAKE_EXE_LINKER_FLAGS_MAINTAINER |
---|
207 | "${CMAKE_EXE_LINKER_FLAGS_DEBUG}" CACHE STRING |
---|
208 | "Flags used for linking binaries during maintainer builds." FORCE |
---|
209 | ) |
---|
210 | SET( CMAKE_SHARED_LINKER_FLAGS_MAINTAINER |
---|
211 | "${CMAKE_SHARED_LINKER_FLAGS_DEBUG}" CACHE STRING |
---|
212 | "Flags used by the shared libraries linker during maintainer builds." |
---|
213 | FORCE |
---|
214 | ) |
---|
215 | ELSE() |
---|
216 | SET( CMAKE_CXX_FLAGS_MAINTAINER "-Werror -ggdb -O0" CACHE STRING |
---|
217 | "Flags used by the C++ compiler during maintainer builds." FORCE |
---|
218 | ) |
---|
219 | SET( CMAKE_C_FLAGS_MAINTAINER "-Werror -O0" CACHE STRING |
---|
220 | "Flags used by the C compiler during maintainer builds." FORCE |
---|
221 | ) |
---|
222 | SET( CMAKE_EXE_LINKER_FLAGS_MAINTAINER |
---|
223 | "${CMAKE_EXE_LINKER_FLAGS_DEBUG}" CACHE STRING |
---|
224 | "Flags used for linking binaries during maintainer builds." FORCE |
---|
225 | ) |
---|
226 | SET( CMAKE_SHARED_LINKER_FLAGS_MAINTAINER |
---|
227 | "${CMAKE_SHARED_LINKER_FLAGS_DEBUG}" CACHE STRING |
---|
228 | "Flags used by the shared libraries linker during maintainer builds." FORCE) |
---|
229 | ENDIF() |
---|
230 | |
---|
231 | MARK_AS_ADVANCED( |
---|
232 | CMAKE_CXX_FLAGS_MAINTAINER |
---|
233 | CMAKE_C_FLAGS_MAINTAINER |
---|
234 | CMAKE_EXE_LINKER_FLAGS_MAINTAINER |
---|
235 | CMAKE_SHARED_LINKER_FLAGS_MAINTAINER ) |
---|
236 | |
---|
237 | IF(CMAKE_CONFIGURATION_TYPES) |
---|
238 | LIST(APPEND CMAKE_CONFIGURATION_TYPES Maintainer) |
---|
239 | LIST(REMOVE_DUPLICATES CMAKE_CONFIGURATION_TYPES) |
---|
240 | SET(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING |
---|
241 | "Add the configurations that we need" |
---|
242 | FORCE) |
---|
243 | endif() |
---|
244 | |
---|
245 | IF(NOT CMAKE_BUILD_TYPE) |
---|
246 | SET(CMAKE_BUILD_TYPE "Release") |
---|
247 | ENDIF() |
---|
248 | |
---|
249 | SET( CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING |
---|
250 | "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel Maintainer." |
---|
251 | FORCE ) |
---|
252 | |
---|
253 | SET_DIRECTORY_PROPERTIES(PROPERTIES |
---|
254 | COMPILE_DEFINITIONS |
---|
255 | $<$<OR:$<CONFIG:Debug>,$<CONFIG:Maintainer>>:LEMON_ENABLE_DEBUG> |
---|
256 | ) |
---|
257 | |
---|
258 | INCLUDE(CheckTypeSize) |
---|
259 | CHECK_TYPE_SIZE("long long" LONG_LONG) |
---|
260 | SET(LEMON_HAVE_LONG_LONG ${HAVE_LONG_LONG}) |
---|
261 | |
---|
262 | INCLUDE(FindThreads) |
---|
263 | |
---|
264 | IF(NOT LEMON_THREADING) |
---|
265 | IF(CMAKE_USE_PTHREADS_INIT) |
---|
266 | SET(LEMON_THREADING "Pthread") |
---|
267 | ELSEIF(CMAKE_USE_WIN32_THREADS_INIT) |
---|
268 | SET(LEMON_THREADING "Win32") |
---|
269 | ELSE() |
---|
270 | SET(LEMON_THREADING "None") |
---|
271 | ENDIF() |
---|
272 | ENDIF() |
---|
273 | |
---|
274 | SET( LEMON_THREADING "${LEMON_THREADING}" CACHE STRING |
---|
275 | "Choose the threading library, options are: Pthread Win32 None." |
---|
276 | FORCE ) |
---|
277 | |
---|
278 | IF(LEMON_THREADING STREQUAL "Pthread") |
---|
279 | SET(LEMON_USE_PTHREAD TRUE) |
---|
280 | ELSEIF(LEMON_THREADING STREQUAL "Win32") |
---|
281 | SET(LEMON_USE_WIN32_THREADS TRUE) |
---|
282 | ENDIF() |
---|
283 | |
---|
284 | ENABLE_TESTING() |
---|
285 | |
---|
286 | |
---|
287 | INCLUDE(CheckCXXCompilerFlag) |
---|
288 | CHECK_CXX_COMPILER_FLAG("-std=c++11" LEMON_CXX11) |
---|
289 | IF(LEMON_CXX11) |
---|
290 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") |
---|
291 | ENDIF() |
---|
292 | |
---|
293 | |
---|
294 | IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer") |
---|
295 | ADD_CUSTOM_TARGET(check ALL COMMAND ${CMAKE_CTEST_COMMAND}) |
---|
296 | ELSE() |
---|
297 | ADD_CUSTOM_TARGET(check COMMAND ${CMAKE_CTEST_COMMAND}) |
---|
298 | ENDIF() |
---|
299 | |
---|
300 | ADD_SUBDIRECTORY(lemon) |
---|
301 | IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR}) |
---|
302 | ADD_SUBDIRECTORY(contrib) |
---|
303 | ADD_SUBDIRECTORY(demo) |
---|
304 | ADD_SUBDIRECTORY(tools) |
---|
305 | ADD_SUBDIRECTORY(doc) |
---|
306 | ADD_SUBDIRECTORY(test) |
---|
307 | ENDIF() |
---|
308 | |
---|
309 | CONFIGURE_FILE( |
---|
310 | ${PROJECT_SOURCE_DIR}/cmake/LEMONConfig.cmake.in |
---|
311 | ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake |
---|
312 | @ONLY |
---|
313 | ) |
---|
314 | IF(UNIX) |
---|
315 | INSTALL( |
---|
316 | FILES ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake |
---|
317 | DESTINATION share/lemon/cmake |
---|
318 | ) |
---|
319 | ELSEIF(WIN32) |
---|
320 | INSTALL( |
---|
321 | FILES ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake |
---|
322 | DESTINATION cmake |
---|
323 | ) |
---|
324 | ENDIF() |
---|
325 | |
---|
326 | CONFIGURE_FILE( |
---|
327 | ${PROJECT_SOURCE_DIR}/cmake/version.cmake.in |
---|
328 | ${PROJECT_BINARY_DIR}/cmake/version.cmake |
---|
329 | @ONLY |
---|
330 | ) |
---|
331 | |
---|
332 | SET(ARCHIVE_BASE_NAME ${CMAKE_PROJECT_NAME}) |
---|
333 | STRING(TOLOWER ${ARCHIVE_BASE_NAME} ARCHIVE_BASE_NAME) |
---|
334 | SET(ARCHIVE_NAME ${ARCHIVE_BASE_NAME}-${PROJECT_VERSION}) |
---|
335 | ADD_CUSTOM_TARGET(dist |
---|
336 | COMMAND cmake -E remove_directory ${ARCHIVE_NAME} |
---|
337 | COMMAND hg archive ${ARCHIVE_NAME} |
---|
338 | COMMAND cmake -E copy cmake/version.cmake ${ARCHIVE_NAME}/cmake/version.cmake |
---|
339 | COMMAND tar -czf ${ARCHIVE_BASE_NAME}-nodoc-${PROJECT_VERSION}.tar.gz ${ARCHIVE_NAME} |
---|
340 | COMMAND zip -r ${ARCHIVE_BASE_NAME}-nodoc-${PROJECT_VERSION}.zip ${ARCHIVE_NAME} |
---|
341 | COMMAND cmake -E copy_directory doc/html ${ARCHIVE_NAME}/doc/html |
---|
342 | COMMAND tar -czf ${ARCHIVE_NAME}.tar.gz ${ARCHIVE_NAME} |
---|
343 | COMMAND zip -r ${ARCHIVE_NAME}.zip ${ARCHIVE_NAME} |
---|
344 | COMMAND cmake -E copy_directory doc/html ${ARCHIVE_BASE_NAME}-doc-${PROJECT_VERSION} |
---|
345 | COMMAND tar -czf ${ARCHIVE_BASE_NAME}-doc-${PROJECT_VERSION}.tar.gz ${ARCHIVE_BASE_NAME}-doc-${PROJECT_VERSION} |
---|
346 | COMMAND zip -r ${ARCHIVE_BASE_NAME}-doc-${PROJECT_VERSION}.zip ${ARCHIVE_BASE_NAME}-doc-${PROJECT_VERSION} |
---|
347 | COMMAND cmake -E remove_directory ${ARCHIVE_NAME} |
---|
348 | COMMAND cmake -E remove_directory ${ARCHIVE_BASE_NAME}-doc-${PROJECT_VERSION} |
---|
349 | DEPENDS html |
---|
350 | WORKING_DIRECTORY ${PROJECT_BINARY_DIR}) |
---|
351 | |
---|
352 | # CPACK config (Basically for NSIS) |
---|
353 | IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR}) |
---|
354 | SET(CPACK_PACKAGE_NAME ${PROJECT_NAME}) |
---|
355 | SET(CPACK_PACKAGE_VENDOR "EGRES") |
---|
356 | SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY |
---|
357 | "LEMON - Library for Efficient Modeling and Optimization in Networks") |
---|
358 | SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE") |
---|
359 | |
---|
360 | SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) |
---|
361 | |
---|
362 | SET(CPACK_PACKAGE_INSTALL_DIRECTORY |
---|
363 | "${PROJECT_NAME} ${PROJECT_VERSION}") |
---|
364 | SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY |
---|
365 | "${PROJECT_NAME} ${PROJECT_VERSION}") |
---|
366 | |
---|
367 | SET(CPACK_COMPONENTS_ALL headers library html_documentation bin) |
---|
368 | |
---|
369 | SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers") |
---|
370 | SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Dynamic-link library") |
---|
371 | SET(CPACK_COMPONENT_BIN_DISPLAY_NAME "Command line utilities") |
---|
372 | SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation") |
---|
373 | |
---|
374 | SET(CPACK_COMPONENT_HEADERS_DESCRIPTION |
---|
375 | "C++ header files") |
---|
376 | SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION |
---|
377 | "DLL and import library") |
---|
378 | SET(CPACK_COMPONENT_BIN_DESCRIPTION |
---|
379 | "Command line utilities") |
---|
380 | SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION |
---|
381 | "Doxygen generated documentation") |
---|
382 | |
---|
383 | SET(CPACK_COMPONENT_HEADERS_DEPENDS library) |
---|
384 | |
---|
385 | SET(CPACK_COMPONENT_HEADERS_GROUP "Development") |
---|
386 | SET(CPACK_COMPONENT_LIBRARY_GROUP "Development") |
---|
387 | SET(CPACK_COMPONENT_HTML_DOCUMENTATION_GROUP "Documentation") |
---|
388 | |
---|
389 | SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION |
---|
390 | "Components needed to develop software using LEMON") |
---|
391 | SET(CPACK_COMPONENT_GROUP_DOCUMENTATION_DESCRIPTION |
---|
392 | "Documentation of LEMON") |
---|
393 | |
---|
394 | SET(CPACK_ALL_INSTALL_TYPES Full Developer) |
---|
395 | |
---|
396 | SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full) |
---|
397 | SET(CPACK_COMPONENT_LIBRARY_INSTALL_TYPES Developer Full) |
---|
398 | SET(CPACK_COMPONENT_HTML_DOCUMENTATION_INSTALL_TYPES Full) |
---|
399 | |
---|
400 | SET(CPACK_GENERATOR "NSIS") |
---|
401 | SET(CPACK_NSIS_MUI_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis/lemon.ico") |
---|
402 | SET(CPACK_NSIS_MUI_UNIICON "${PROJECT_SOURCE_DIR}/cmake/nsis/uninstall.ico") |
---|
403 | #SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis\\\\installer.bmp") |
---|
404 | SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\lemon.ico") |
---|
405 | SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} ${PROJECT_NAME}") |
---|
406 | SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\lemon.cs.elte.hu") |
---|
407 | SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\lemon.cs.elte.hu") |
---|
408 | SET(CPACK_NSIS_CONTACT "lemon-user@lemon.cs.elte.hu") |
---|
409 | SET(CPACK_NSIS_CREATE_ICONS_EXTRA " |
---|
410 | CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation.lnk\\\" \\\"$INSTDIR\\\\share\\\\doc\\\\index.html\\\" |
---|
411 | ") |
---|
412 | SET(CPACK_NSIS_DELETE_ICONS_EXTRA " |
---|
413 | !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP |
---|
414 | Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Documentation.lnk\\\" |
---|
415 | ") |
---|
416 | |
---|
417 | INCLUDE(CPack) |
---|
418 | ENDIF() |
---|