Skip to content
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

Generate cmake target that links all the libraries to support using target_link_libraries #26

Open
tylerjw opened this issue Jan 25, 2023 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@tylerjw
Copy link

tylerjw commented Jan 25, 2023

The generated libraries have really long names like control_msgs__rosidl_typesupport_c and there are many for each messages project. In order to support linking against a messages package with target_link_libraries like this:

target_link_libraries(hardware_interface PUBLIC control_msgs::control_msgs)

Could we add a generated cmake library target that links with all of the generated message libraries?

@sloretz
Copy link
Contributor

sloretz commented Feb 9, 2023

There is a variable - ${control_msgs_TARGETS} - which contains all targets from all the generators (assuming they export them). That's what I usually use.

There is a top level target already, but right now it's just there to have a way to wait until after message generation completes. Maybe it could be remade to a target that gets exported?

@sloretz sloretz added enhancement New feature or request help wanted Extra attention is needed labels Feb 23, 2024
@sloretz sloretz removed their assignment Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants