0
5
0
1 | 1 |
CMAKE_MINIMUM_REQUIRED(VERSION 2.6) |
2 | 2 |
|
3 | 3 |
IF(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake) |
4 | 4 |
INCLUDE(${CMAKE_SOURCE_DIR}/cmake/version.cmake) |
5 | 5 |
ELSE(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake) |
6 | 6 |
SET(PROJECT_NAME "LEMON") |
7 | 7 |
SET(PROJECT_VERSION "hg-tip" CACHE STRING "LEMON version string.") |
8 | 8 |
ENDIF(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake) |
9 | 9 |
|
10 | 10 |
PROJECT(${PROJECT_NAME}) |
11 | 11 |
|
12 | 12 |
SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) |
13 | 13 |
|
14 | 14 |
INCLUDE(FindDoxygen) |
15 | 15 |
INCLUDE(FindGhostscript) |
16 | 16 |
|
17 |
ADD_DEFINITIONS(-DHAVE_CONFIG_H) |
|
18 |
|
|
17 | 19 |
INCLUDE(CheckTypeSize) |
18 | 20 |
CHECK_TYPE_SIZE("long long" LONG_LONG) |
19 | 21 |
|
20 | 22 |
ENABLE_TESTING() |
21 | 23 |
|
22 | 24 |
ADD_SUBDIRECTORY(lemon) |
23 | 25 |
ADD_SUBDIRECTORY(demo) |
24 | 26 |
ADD_SUBDIRECTORY(doc) |
25 | 27 |
ADD_SUBDIRECTORY(test) |
26 | 28 |
|
27 | 29 |
IF(WIN32) |
28 | 30 |
SET(CPACK_PACKAGE_NAME ${PROJECT_NAME}) |
29 | 31 |
SET(CPACK_PACKAGE_VENDOR "EGRES") |
30 | 32 |
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY |
31 | 33 |
"LEMON - Library of Efficient Models and Optimization in Networks") |
32 | 34 |
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE") |
33 | 35 |
|
34 | 36 |
SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) |
35 | 37 |
|
36 | 38 |
SET(CPACK_PACKAGE_INSTALL_DIRECTORY |
37 | 39 |
"${PROJECT_NAME} ${PROJECT_VERSION}") |
38 | 40 |
SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY |
39 | 41 |
"${PROJECT_NAME} ${PROJECT_VERSION}") |
40 | 42 |
|
41 | 43 |
SET(CPACK_COMPONENTS_ALL headers library html_documentation) |
42 | 44 |
|
43 | 45 |
SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers") |
44 | 46 |
SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Dynamic-link library") |
45 | 47 |
SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation") |
46 | 48 |
|
47 | 49 |
SET(CPACK_COMPONENT_HEADERS_DESCRIPTION |
48 | 50 |
"C++ header files") |
49 | 51 |
SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION |
50 | 52 |
"DLL and import library") |
51 | 53 |
SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION |
52 | 54 |
"Doxygen generated documentation") |
53 | 55 |
|
54 | 56 |
SET(CPACK_COMPONENT_HEADERS_DEPENDS library) |
55 | 57 |
|
56 | 58 |
SET(CPACK_COMPONENT_HEADERS_GROUP "Development") |
57 | 59 |
SET(CPACK_COMPONENT_LIBRARY_GROUP "Development") |
58 | 60 |
SET(CPACK_COMPONENT_HTML_DOCUMENTATION_GROUP "Documentation") |
59 | 61 |
|
60 | 62 |
SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION |
61 | 63 |
"Components needed to develop software using LEMON") |
62 | 64 |
SET(CPACK_COMPONENT_GROUP_DOCUMENTATION_DESCRIPTION |
63 | 65 |
"Documentation of LEMON") |
64 | 66 |
1 |
INCLUDE_DIRECTORIES( |
|
1 |
INCLUDE_DIRECTORIES( |
|
2 |
${CMAKE_SOURCE_DIR} |
|
3 |
${PROJECT_BINARY_DIR} |
|
4 |
) |
|
2 | 5 |
|
3 | 6 |
LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/lemon) |
4 | 7 |
|
5 | 8 |
SET(DEMOS |
6 | 9 |
arg_parser_demo |
7 | 10 |
graph_to_eps_demo |
8 | 11 |
lgf_demo) |
9 | 12 |
|
10 | 13 |
FOREACH(DEMO_NAME ${DEMOS}) |
11 | 14 |
ADD_EXECUTABLE(${DEMO_NAME} ${DEMO_NAME}.cc) |
12 | 15 |
TARGET_LINK_LIBRARIES(${DEMO_NAME} lemon) |
13 | 16 |
ENDFOREACH(DEMO_NAME) |
1 |
INCLUDE_DIRECTORIES( |
|
1 |
INCLUDE_DIRECTORIES( |
|
2 |
${CMAKE_SOURCE_DIR} |
|
3 |
${PROJECT_BINARY_DIR} |
|
4 |
) |
|
5 |
|
|
6 |
CONFIGURE_FILE( |
|
7 |
${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake |
|
8 |
${CMAKE_CURRENT_BINARY_DIR}/config.h |
|
9 |
) |
|
2 | 10 |
|
3 | 11 |
ADD_LIBRARY(lemon |
4 | 12 |
arg_parser.cc |
5 | 13 |
base.cc |
6 | 14 |
color.cc |
7 | 15 |
random.cc |
8 | 16 |
bits/windows.cc |
9 | 17 |
) |
10 | 18 |
|
11 | 19 |
INSTALL( |
12 | 20 |
TARGETS lemon |
13 | 21 |
ARCHIVE DESTINATION lib |
14 | 22 |
COMPONENT library) |
15 | 23 |
|
16 | 24 |
INSTALL( |
17 | 25 |
DIRECTORY . bits concepts |
18 | 26 |
DESTINATION include/lemon |
19 | 27 |
COMPONENT headers |
20 | 28 |
FILES_MATCHING PATTERN "*.h") |
29 |
|
|
30 |
INSTALL( |
|
31 |
FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h |
|
32 |
DESTINATION include/lemon |
|
33 |
COMPONENT headers) |
1 | 1 |
EXTRA_DIST += \ |
2 | 2 |
lemon/lemon.pc.in \ |
3 | 3 |
lemon/CMakeLists.txt |
4 | 4 |
|
5 | 5 |
pkgconfig_DATA += lemon/lemon.pc |
6 | 6 |
|
7 | 7 |
lib_LTLIBRARIES += lemon/libemon.la |
8 | 8 |
|
9 | 9 |
lemon_libemon_la_SOURCES = \ |
10 | 10 |
lemon/arg_parser.cc \ |
11 | 11 |
lemon/base.cc \ |
12 | 12 |
lemon/color.cc \ |
13 | 13 |
lemon/random.cc \ |
14 | 14 |
lemon/bits/windows.cc |
15 | 15 |
|
16 | 16 |
#lemon_libemon_la_CXXFLAGS = $(GLPK_CFLAGS) $(CPLEX_CFLAGS) $(SOPLEX_CXXFLAGS) |
17 | 17 |
#lemon_libemon_la_LDFLAGS = $(GLPK_LIBS) $(CPLEX_LIBS) $(SOPLEX_LIBS) |
18 | 18 |
|
19 | 19 |
lemon_HEADERS += \ |
20 | 20 |
lemon/arg_parser.h \ |
21 | 21 |
lemon/assert.h \ |
22 | 22 |
lemon/bfs.h \ |
23 | 23 |
lemon/bin_heap.h \ |
24 | 24 |
lemon/color.h \ |
25 | 25 |
lemon/concept_check.h \ |
26 |
lemon/config.h \ |
|
26 | 27 |
lemon/counter.h \ |
27 | 28 |
lemon/core.h \ |
28 | 29 |
lemon/dfs.h \ |
29 | 30 |
lemon/dijkstra.h \ |
30 | 31 |
lemon/dim2.h \ |
31 | 32 |
lemon/error.h \ |
32 | 33 |
lemon/graph_to_eps.h \ |
33 | 34 |
lemon/kruskal.h \ |
34 | 35 |
lemon/lgf_reader.h \ |
35 | 36 |
lemon/lgf_writer.h \ |
36 | 37 |
lemon/list_graph.h \ |
37 | 38 |
lemon/maps.h \ |
38 | 39 |
lemon/math.h \ |
39 | 40 |
lemon/path.h \ |
40 | 41 |
lemon/random.h \ |
41 | 42 |
lemon/smart_graph.h \ |
42 | 43 |
lemon/time_measure.h \ |
43 | 44 |
lemon/tolerance.h \ |
44 | 45 |
lemon/unionfind.h \ |
45 | 46 |
lemon/bits/windows.h |
46 | 47 |
|
47 | 48 |
bits_HEADERS += \ |
48 | 49 |
lemon/bits/alteration_notifier.h \ |
49 | 50 |
lemon/bits/array_map.h \ |
50 | 51 |
lemon/bits/base_extender.h \ |
51 | 52 |
lemon/bits/bezier.h \ |
52 | 53 |
lemon/bits/default_map.h \ |
53 | 54 |
lemon/bits/enable_if.h \ |
54 | 55 |
lemon/bits/graph_extender.h \ |
55 | 56 |
lemon/bits/map_extender.h \ |
56 | 57 |
lemon/bits/path_dump.h \ |
57 | 58 |
lemon/bits/traits.h \ |
58 | 59 |
lemon/bits/vector_map.h |
59 | 60 |
|
60 | 61 |
concept_HEADERS += \ |
61 | 62 |
lemon/concepts/digraph.h \ |
62 | 63 |
lemon/concepts/graph.h \ |
63 | 64 |
lemon/concepts/graph_components.h \ |
64 | 65 |
lemon/concepts/heap.h \ |
65 | 66 |
lemon/concepts/maps.h \ |
66 | 67 |
lemon/concepts/path.h |
1 |
INCLUDE_DIRECTORIES( |
|
1 |
INCLUDE_DIRECTORIES( |
|
2 |
${CMAKE_SOURCE_DIR} |
|
3 |
${PROJECT_BINARY_DIR} |
|
4 |
) |
|
2 | 5 |
|
3 | 6 |
LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/lemon) |
4 | 7 |
|
5 | 8 |
SET(TESTS |
6 | 9 |
bfs_test |
7 | 10 |
counter_test |
8 | 11 |
dfs_test |
9 | 12 |
digraph_test |
10 | 13 |
dijkstra_test |
11 | 14 |
dim_test |
12 | 15 |
error_test |
13 | 16 |
graph_copy_test |
14 | 17 |
graph_test |
15 | 18 |
graph_utils_test |
16 | 19 |
heap_test |
17 | 20 |
kruskal_test |
18 | 21 |
maps_test |
19 | 22 |
random_test |
20 | 23 |
path_test |
21 | 24 |
time_measure_test |
22 | 25 |
unionfind_test) |
23 | 26 |
|
24 | 27 |
FOREACH(TEST_NAME ${TESTS}) |
25 | 28 |
ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc) |
26 | 29 |
TARGET_LINK_LIBRARIES(${TEST_NAME} lemon) |
27 | 30 |
ADD_TEST(${TEST_NAME} ${TEST_NAME}) |
28 | 31 |
ENDFOREACH(TEST_NAME) |
0 comments (0 inline)