-
Notifications
You must be signed in to change notification settings - Fork 142
Description
Hi,
I see several examples in ROS2 code that ament_export_dependencies
is used for PRIVATE
dependencies, like
- kdl_parser project
https://github.com/ros/kdl_parser/blob/jazzy/kdl_parser/CMakeLists.txt#L28
target_link_libraries(${PROJECT_NAME} PRIVATE
rcutils::rcutils
urdf::urdf)
and it's exported:
https://github.com/ros/kdl_parser/blob/jazzy/kdl_parser/CMakeLists.txt#L59
ament_export_dependencies(rcutils)
- camera_calibration_parsers project
target_link_libraries(${PROJECT_NAME} PRIVATE
rclcpp::rclcpp
yaml-cpp::yaml-cpp)
and it's exported:
https://github.com/ros-perception/image_common/blob/jazzy/camera_calibration_parsers/CMakeLists.txt#L88
ament_export_dependencies(rclcpp sensor_msgs yaml_cpp_vendor)
I can list more if I search more in the ros2 source code. I have to say, those usage really confused me. For PRIVATE dependencies, I don't think it's necessary to export them.
Before I raise an issue for those projects, I'd like to make sure the usage of ament_export_dependencies
for PRIVATE
dependencies, it's not mentioned here https://docs.ros.org/en/jazzy/How-To-Guides/Ament-CMake-Documentation.html