Skip to content
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

Merged
merged 2 commits into from
Jan 11, 2022

Conversation

sloretz
Copy link
Contributor

@sloretz sloretz commented Jan 8, 2022

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 avoids ament_target_dependencies() (ament/ament_cmake#292).

Signed-off-by: Shane Loretz <sloretz@openrobotics.org>
@sloretz sloretz self-assigned this Jan 8, 2022
@sloretz
Copy link
Contributor Author

sloretz commented Jan 8, 2022

CI (build: --packages-above-and-dependencies tf2_geometry_msgs test: --packages-above tf2_geometry_msgs)

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status - libcurl_vendor download failed
    • retry: Build Status

Copy link
Contributor

@clalancette clalancette left a 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.

Comment on lines 51 to 53
target_link_libraries(test_tf2_geometry_msgs
${PROJECT_NAME}
rclcpp::rclcpp)
Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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>
@sloretz sloretz requested a review from clalancette January 11, 2022 19:48
@sloretz
Copy link
Contributor Author

sloretz commented Jan 11, 2022

CI (build: --packages-up-to tf2_geometry_msgs test: --packages-select tf2_geometry_msgs, previous CI already tested packages above and changes since is just a comment)

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants