-
Notifications
You must be signed in to change notification settings - Fork 37
/
CMakeLists.txt
38 lines (33 loc) · 962 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
# Create a linkable module
add_library(udp-input MODULE
udp.c
config.c
config.h
)
if (CMAKE_HOST_SYSTEM_NAME STREQUAL "FreeBSD" OR CMAKE_HOST_SYSTEM_NAME STREQUAL "OpenBSD")
find_package(LibEpollShim REQUIRED)
include_directories(
${LIBEPOLLSHIM_INCLUDE_DIRS}
)
target_link_libraries(udp-input
${LIBEPOLLSHIM_LIBRARIES}
)
endif()
install(
TARGETS udp-input
LIBRARY DESTINATION "${INSTALL_DIR_LIB}/ipfixcol2/"
)
if (ENABLE_DOC_MANPAGE)
# Build a manual page
set(SRC_FILE "${CMAKE_CURRENT_SOURCE_DIR}/doc/ipfixcol2-udp-input.7.rst")
set(DST_FILE "${CMAKE_CURRENT_BINARY_DIR}/ipfixcol2-udp-input.7")
add_custom_command(TARGET udp-input 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()