-
Notifications
You must be signed in to change notification settings - Fork 130
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
no way to ament_export a package with its components #199
Comments
Afaik there is no way in CMake to determine which components of a package were found. If you happen to know a way to retrieve the information Otherwise a new function like Exporting targets doesn't make this case go away - except if absolute paths of dependencies are exported at build time of a package which is undesired since it prevent relocating the dependencies. |
EDIT: these might not be exposed after
Why not? These should already be |
Because the underlying dependency might have been relocated (Boost is a bad example for that).
|
Got it. So I guess
Thank you SO MUCH! This clears up a long-standing mystery to me why I sometimes see headers being used from the underlay when they exist in my overlay. I think #173 will need to be fixed before I can switch over to target-level linking. |
That is probably due to the wrong order of include directories. If you need to specify multiple you can make sure they follow the overlay/underlay order using this function: ament_cmake/ament_cmake_include_directories/cmake/ament_include_directories_order.cmake Lines 15 to 25 in 95cab1d
|
Maybe. I noticed it in on someone else's package that used A quick codesearch through my ROS2 master source: Could you please document correct usage in the Ament CMake Documentation |
Please consider contributing to the tutorial: https://github.com/ros2/ros2_documentation/blob/master/source/Tutorials/Ament-CMake-Documentation.rst I will likely not have the bandwidth to do so in the near future. |
I would if I understood well enough to make recommendations. I’ll see what I can do |
Changing the name of this ticket back. The ticket describes a behavioral quirk, which users of the library should be aware of. The previous suggested title might be a good name for a PR that resolves this issue but does not describe the functional gap itself. |
Sure, then I will mark this as |
Alright. Revised the title yet again to somewhere in the middle. I suppose my title was a bit to prescriptive too |
ament_export_dependencies
is supposed to be used to re-export packages for downstream use. Unfortunately when using Boost or other large libraries, components don't tend to get re-exported. It would be nice if possible to haveament_export_dependencies
andament_target_dependencies
respect the imported components of a package.This may eventually be obsolete if we shift more to exporting targets instead of packages as per Discourse discussion "Ament best practice for sharing libraries"
Original answers.ros question with the example:
The text was updated successfully, but these errors were encountered: