-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export a tf2_geometry_msgs::tf2_geometry_msgs target #496
Conversation
Signed-off-by: Shane Loretz <sloretz@openrobotics.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One request for a change, but otherwise looks good to me.
tf2_geometry_msgs/CMakeLists.txt
Outdated
target_link_libraries(test_tf2_geometry_msgs | ||
${PROJECT_NAME} | ||
rclcpp::rclcpp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like we should still have an explicit dependency on tf2_ros
here, as the test directly depends upon it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I chose to not to make the test target_link_libraries(... tf2_ros::tf2_ros)
to make sure the ${PROJECT_NAME}
target is properly exporting it. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summarizing our off-github chat - I'll update these PRs to comment which dependencies are being gotten from other targets in the same CMake package. This retains a check on if the exported targets are properly exporting their dependencies, while also allowing future readers of the code to know what's being depended upon and why it wasn't in the CMake file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commented that tf2_ros::tf2_ros
is required but intentionally not linked in 983cd0d
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
Split from #493
This makes tf2_geometry_msgs use more modern CMake. It now exports a
tf2_geometry_msgs::tf2_geometry_msgs
target so downstream projects can use modern CMake, and avoidsament_target_dependencies()
(ament/ament_cmake#292).