File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed
Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,23 @@ if (DATA_TAMER_BUILD_ROS)
104104 find_package (rclcpp_lifecycle REQUIRED)
105105 find_package (data_tamer_msgs REQUIRED)
106106
107- ament_target_dependencies(data_tamer mcap_vendor rclcpp rclcpp_lifecycle data_tamer_msgs)
107+ target_include_directories (data_tamer PUBLIC
108+ ${mcap_vendor_INCLUDE_DIRS}
109+ ${rclcpp_INCLUDE_DIRS}
110+ ${rclcpp_lifecycle_INCLUDE_DIRS}
111+ ${data_tamer_msgs_INCLUDE_DIRS}
112+ )
113+
114+ # we need to find the underlying library for `target_link_libraries` to work
115+ find_library (MCAP_LIBRARY mcap PATHS ${mcap_vendor_LIBRARY_DIRS} )
116+
117+ target_link_libraries (data_tamer PUBLIC
118+ ${mcap_vendor_LIBRARIES}
119+ ${rclcpp_LIBRARIES}
120+ ${rclcpp_lifecycle_LIBRARIES}
121+ ${data_tamer_msgs_LIBRARIES}
122+ ${MCAP_LIBRARY}
123+ )
108124
109125 ament_export_targets(data_tamerTargets HAS_LIBRARY_TARGET)
110126 ament_export_dependencies(mcap_vendor rclcpp rclcpp_lifecycle data_tamer_msgs)
Original file line number Diff line number Diff line change @@ -18,7 +18,13 @@ target_include_directories(mcap_reader
1818# optionally build for ROS 2
1919option (DATA_TAMER_BUILD_ROS "Build for ROS 2" ON )
2020if ( DATA_TAMER_BUILD_ROS AND ament_cmake_FOUND )
21- ament_target_dependencies(mcap_reader mcap_vendor)
21+ target_include_directories (mcap_reader PUBLIC
22+ ${mcap_vendor_INCLUDE_DIRS}
23+ )
24+ target_link_libraries (mcap_reader
25+ data_tamer
26+ ${mcap_vendor_LIBRARIES}
27+ )
2228
2329 CompileExample(ros2_publisher)
2430
You can’t perform that action at this time.
0 commit comments