Skip to content

Commit

Permalink
Link pcap nodelet only if BUILD_PCAP is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
ovaag committed Aug 23, 2024
1 parent 8b81347 commit 598b22d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ add_definitions(-DEIGEN_MPL2_ONLY)
set(OUSTER_TARGET_LINKS ouster_client)
if (BUILD_PCAP)
list(APPEND OUSTER_TARGET_LINKS ouster_pcap)
# Include os_pcap_nodelet.cpp only if BUILD_PCAP is defined
set(PCAP_NODELET_SRC src/os_pcap_nodelet.cpp)
else()
set(PCAP_NODELET_SRC "")
endif()

add_library(ouster_ros src/os_ros.cpp)
Expand All @@ -91,7 +95,7 @@ add_library(${PROJECT_NAME}_nodelets
src/os_sensor_nodelet_base.cpp
src/os_sensor_nodelet.cpp
src/os_replay_nodelet.cpp
src/os_pcap_nodelet.cpp
${PCAP_NODELET_SRC} # Include os_pcap_nodelet.cpp only if BUILD_PCAP is defined
src/os_cloud_nodelet.cpp
src/os_image_nodelet.cpp
src/os_driver_nodelet.cpp)
Expand Down

0 comments on commit 598b22d

Please sign in to comment.