ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Export multiple libraries (ros2)?

asked 2021-01-25 12:23:45 -0600

updated 2021-01-25 12:23:55 -0600

Regarding the documentation here:

I have a case where I want to export multiple shared libraries from the same ros package. I'm not sure what the right notation is. Does the EXPORT line in the install take a list (should I explicitly list the library names here?). It seems that TARGETS can take a list.

As to the ament_export_targets call, how does it associate the library my_library with export_my_library? How would I write it if I wanted to export two separate libraries from the same project?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2021-03-30 09:58:01 -0600

hidmic gravatar image

Going over ament_export_targets() API documentation and code may shed some light here. Most of the work is actually done by its hook. You can see that you may associate as many targets to an export as you like, and install as many exports as you like. All will fall under the same package-wide namespace, to be picked up by the extras file specific to this part of ament_cmake.

If this seems unclear, consider revisiting CMake's target exportation/importation semantics.

edit flag offensive delete link more

Question Tools



Asked: 2021-01-25 12:23:45 -0600

Seen: 450 times

Last updated: Mar 30 '21