forked from CESNET/ipfixcol2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
42 lines (37 loc) · 1016 Bytes
/
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
# Create a linkable module
add_library(json-output MODULE
src/json.cpp
src/Config.cpp
src/Config.hpp
src/Storage.cpp
src/Storage.hpp
src/Printer.cpp
src/Printer.hpp
src/File.cpp
src/File.hpp
src/Server.cpp
src/Server.hpp
src/Sender.cpp
src/Server.hpp
)
find_package(ZLIB REQUIRED)
include_directories(${ZLIB_INCLUDE_DIRS})
target_link_libraries(json-output ${ZLIB_LIBRARIES})
install(
TARGETS json-output
LIBRARY DESTINATION "${INSTALL_DIR_LIB}/ipfixcol2/"
)
if (ENABLE_DOC_MANPAGE)
# Build a manual page
set(SRC_FILE "${CMAKE_CURRENT_SOURCE_DIR}/doc/ipfixcol2-json-output.7.rst")
set(DST_FILE "${CMAKE_CURRENT_BINARY_DIR}/ipfixcol2-json-output.7")
add_custom_command(TARGET json-output PRE_BUILD
COMMAND ${RST2MAN_EXECUTABLE} --syntax-highlight=none ${SRC_FILE} ${DST_FILE}
DEPENDS ${SRC_FILE}
VERBATIM
)
install(
FILES "${DST_FILE}"
DESTINATION "${INSTALL_DIR_MAN}/man7"
)
endif()