Depend on 3rd party ament packages via target_link_libraries
where possible
#2583
Labels
enhancement
New feature or request
help wanted
Extra attention is needed
infrastructure
persistent
Allows issues to remain open without automatic stalling and closing.
Many modern ROS packages export a single CMake target that encodes everything required to use it. For those packages we are better off using
target_link_libraries
to link to that target. It's the simpler and canonical solution to linking to 3rd party libraries.This has the benefit of ensuring that if a target doesn't exist we get a hard failure. Any namespaces CMake target (any target with
::
in its name) must exist or else configuration fails. This prevents subtle issues like what caused #2578.The text was updated successfully, but these errors were encountered: