-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
54 lines (44 loc) · 1.04 KB
/
CMakeLists.txt
File metadata and controls
54 lines (44 loc) · 1.04 KB
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
add_library(ipfixprobe-core STATIC
ipfixprobe.cpp
ipfixprobe.hpp
options.cpp
ring.c
stacktrace.cpp
stacktrace.hpp
stats.cpp
stats.hpp
utils.cpp
workers.cpp
workers.hpp
inputPlugin.cpp
pluginManager.cpp
pluginManager.hpp
)
target_include_directories(ipfixprobe-core PUBLIC
${CMAKE_SOURCE_DIR}/include
${CMAKE_BINARY_DIR}/src
)
target_compile_options(ipfixprobe-core PRIVATE -fPIC)
set(CORE_LIB -Wl,--whole-archive ipfixprobe-core -Wl,--no-whole-archive)
target_link_libraries(ipfixprobe-core
pthread
telemetry::telemetry
telemetry::appFs
atomic::atomic
${CMAKE_DL_LIBS}
)
if (ENABLE_UNWIND)
target_link_libraries(ipfixprobe-core unwind::unwind)
target_compile_definitions(ipfixprobe-core PRIVATE
WITH_UNWIND
)
endif()
add_executable(ipfixprobe main.cpp)
target_link_libraries(ipfixprobe ${CORE_LIB})
target_link_options(ipfixprobe PRIVATE -Wl,--export-dynamic)
set_target_properties(
ipfixprobe PROPERTIES
CXX_VISIBILITY_PRESET hidden
VISIBILITY_INLINES_HIDDEN YES
)
install(TARGETS ipfixprobe DESTINATION "${INSTALL_DIR_BIN}")