Ask Your Question
0

Export multiple libraries (ros2)?

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

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

Regarding the documentation here: https://index.ros.org/doc/ros2/Tutori...

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
0

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

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

Seen: 88 times

Last updated: Mar 30