Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ros2launch_security_examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ find_package(rclpy REQUIRED)
find_package(sensor_msgs REQUIRED)

add_library(fake_imu_library SHARED src/fake_imu.cpp)
ament_target_dependencies(fake_imu_library rclcpp rclcpp_components sensor_msgs example_interfaces)
target_link_libraries(fake_imu_library PUBLIC rclcpp rclcpp_components sensor_msgs example_interfaces)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The above couldn't find rclcpp on Jazzy, it seems we need the namespaced form for clean builds:

Suggested change
target_link_libraries(fake_imu_library PUBLIC rclcpp rclcpp_components sensor_msgs example_interfaces)
target_link_libraries(fake_imu_library PUBLIC rclcpp::rclcpp rclcpp_components::component ${sensor_msgs_TARGETS} ${example_interfaces_TARGETS})

rclcpp_components_register_node(fake_imu_library
PLUGIN "ros2launch_security_examples::FakeImu"
EXECUTABLE fake_imu
Expand All @@ -27,7 +27,7 @@ rclcpp_components_register_node(fake_imu_library
nodl_export_node_description_file(fake_imu.nodl.xml)

add_library(imu_sink_library SHARED src/imu_sink.cpp)
ament_target_dependencies(imu_sink_library rclcpp rclcpp_components sensor_msgs example_interfaces)
target_link_libraries(imu_sink_library PUBLIC rclcpp rclcpp_components sensor_msgs example_interfaces)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
target_link_libraries(imu_sink_library PUBLIC rclcpp rclcpp_components sensor_msgs example_interfaces)
target_link_libraries(imu_sink_library PUBLIC rclcpp::rclcpp rclcpp_components::component ${sensor_msgs_TARGETS} ${example_interfaces_TARGETS})

rclcpp_components_register_node(imu_sink_library
PLUGIN "ros2launch_security_examples::ImuSink"
EXECUTABLE imu_sink
Expand Down