forked from ouster-lidar/ouster-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
33 lines (28 loc) · 965 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
# ==== Requirements ====
find_package(Pcap REQUIRED)
find_package(libtins REQUIRED)
include(Coverage)
# ==== Libraries ====
add_library(ouster_pcap src/pcap.cpp src/os_pcap.cpp src/indexed_pcap_reader.cpp src/ip_reassembler.cpp)
target_include_directories(ouster_pcap SYSTEM PRIVATE
${PCAP_INCLUDE_DIR})
target_include_directories(ouster_pcap PUBLIC
$<INSTALL_INTERFACE:include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
CodeCoverageFunctionality(ouster_pcap)
if(WIN32)
target_link_libraries(ouster_pcap PUBLIC ws2_32)
endif()
target_link_libraries(ouster_pcap
PUBLIC
OusterSDK::ouster_client
PRIVATE libpcap::libpcap libtins::libtins)
add_library(OusterSDK::ouster_pcap ALIAS ouster_pcap)
# ==== Install ====
install(TARGETS ouster_pcap
EXPORT ouster-sdk-targets
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
INCLUDES DESTINATION include)
install(DIRECTORY include/ouster DESTINATION include)