-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
82 lines (70 loc) · 2.04 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
cmake_minimum_required(VERSION 3.7 FATAL_ERROR)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -g")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} -Wall -Werror=implicit-function-declaration -O2")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -Wall -Werror=implicit-function-declaration -O2 -g")
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib/prince")
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
project(poprouting LANGUAGES C)
find_package(Threads)
add_executable(prince
graph-parser_c/src/biconnected.c
graph-parser_c/src/brandes.c
graph-parser_c/src/graph/graph.c
graph-parser_c/src/graph/list.c
graph-parser_c/src/graph_parser.c
graph-parser_c/src/network_change.c
prince/src/config.c
prince/src/config_proto.c
prince/src/config_graph.c
prince/src/load_plugin.c
prince/src/prince.c
prince/src/prince_handler.c
prince/src/socket.c
prince/src/topology.c
prince/src/topology_parser.c
)
target_link_libraries(prince
${CMAKE_DL_LIBS}
${CMAKE_THREAD_LIBS_INIT}
m
json-c
)
include_directories(
prince/include
graph-parser_c/include
)
add_library(prince_oonf MODULE
prince/lib/oonf/oonf.c
prince/src/topology_parser.c
prince/src/socket.c
prince/src/topology.c
prince/src/topology_parser.c
)
add_library(prince_olsr MODULE
prince/lib/olsrd/olsr.c
prince/src/socket.c
prince/src/topology.c
prince/src/topology_parser.c
)
add_library(prince_test MODULE
prince/lib/testlib/test.c
prince/src/topology_parser.c
prince/src/socket.c
prince/src/topology.c
prince/src/topology_parser.c
)
install(TARGETS
prince
prince_oonf
prince_olsr
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib/prince
)
install(TARGETS
prince
prince_test
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib/prince
COMPONENT test
EXCLUDE_FROM_ALL
)