Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

It depends how the downstream package is using your package:

With "modern" CMake your package exports a target (using ament_export_target [as of Foxy] or ament_export_interfaces [deprecated as of Foxy]) and downstream packages use the interface targets from the CMake variable <pkgname>_EXPORTS.

Or with "classic" CMake your package exports include directories (ament_export_include_directories), libraries (ament_export_libraries), definitions, link flags, etc. and downstream packages use the various CMake variables like <pkgname>_INCLUDE_DIRS, <pkgname>_LIBRARIES, etc.

Your package can export information with both approaches to support either style in downstream packages.

If downstream packages use ament_target_dependencies() it doesn't matter if you package uses the modern, classic or boths approaches.

Note that the upcoming Foxy release contains improvements and fixes around the modern CMake approach which might not have been backported to Eloquent and Dashing yet.