-
Notifications
You must be signed in to change notification settings - Fork 205
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 libraries to trigger hooks. #358
Conversation
rviz_default_plugins/CMakeLists.txt
Outdated
@@ -241,6 +241,7 @@ ament_target_dependencies(rviz_default_plugins | |||
|
|||
ament_export_include_directories(include) | |||
ament_export_interfaces(rviz_default_plugins) | |||
ament_export_libraries(rviz_default_plugins) |
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 wonder if this is redundant with ament_export_interfaces
, or rather whether or not that function should also extend the library paths.
@dirk-thomas what do you think?
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.
While both do kind of the same thing they work differently:
ament_export_interfaces
is used to export the targets via CMakeinstall(EXPORT ...)
ament_export_libraries
exports libraries using the variable<pkgname>_LIBRARIES
Both make sense depending on how downstream packages want to use them.
Since the target is a library ament_export_interfaces
should pass the option HAS_LIBRARY_TARGET
(see https://github.com/ament/ament_cmake/blob/88add8cab0ca579e89e95b3ab343af319c163195/ament_cmake_export_interfaces/cmake/ament_export_interfaces.cmake#L22-L24).
HAS_LIBRARY_TARGET
Replaces ament_export_libraries with the HAS_LIBRARY_TARGET option for ament_export_interfaces.
I've updated this PR to use the HAS_LIBRARY_TARGET option rather than ament_export_libraries as all I needed was the environment hook to be set. I swapped rather than did both since I think it's reasonable to make the minimal change unless maintainers prefer otherwise. |
@mjcarroll you might want to consider this pr in the migration of the yaml cpp stuff. |
Add
ament_export_libraries
calls to export libraries and set necessary environment hooks. The rviz packages are some of a handful which install libraries exporting them.In conversation with @wjwwood we surmised that this was likely a small oversight rather than something that was done intentionally.
Connects to ros2/ros_workspace#10