forked from JunanDang/CAB_SDN_HELPER
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
61 lines (54 loc) · 1.41 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
cmake_minimum_required(VERSION 2.8)
project(CAB_SDN)
set(CMAKE_CXX_COMPILER /usr/bin/g++)
set(CMAKE_CXX_FLAGS "-std=c++11 -g")
find_package(Boost 1.55.0 REQUIRED COMPONENTS system thread filesystem iostreams log log_setup)
if(Boost_FOUND)
message(STATUS "Boost found")
message(STATUS "BOOST_LIBRARIES: " ${Boost_LIBRARIES})
add_definitions(-DBOOST_LOG_DYN_LINK)
endif()
set(libcab_include "../CAB_SDN")
set(libcab_lib "/home/bigmac-admin/Junan/CAB_SDN/build/libcab.a")
include_directories(./)
include_directories(${libcab_include})
add_executable(CABDaemon CABDaemon.cpp)
add_executable(CMRDaemon CMRDaemon.cpp)
#add_executable(FlowGen FlowGen.cpp)
#add_executable(FlowGen2 FlowGen2.cpp)
add_executable(FlowGen3 FlowGen3.cpp)
if(UNIX)
target_link_libraries(
CABDaemon
${libcab_lib}
${Boost_LIBRARIES}
pthread
)
target_link_libraries(
CMRDaemon
${libcab_lib}
${Boost_LIBRARIES}
pthread
)
# target_link_libraries(
# FlowGen
# pcap
# rt
# )
# target_link_libraries(
# FlowGen2
# pcap
# rt
# )
target_link_libraries(
FlowGen3
pcap
rt
${Boost_LIBRARIES}
)
elseif(WIN32)
elseif(APPLE)
endif(UNIX)
message(STATUS "c++ flag : " ${CMAKE_CXX_FLAGS})
message(STATUS "this is source dir " ${PROJECT_SOURCE_DIR})
message(STATUS "this is binary dir " ${PROJECT_BINARY_DIR})