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

Use common convention for EXPORT name (cherry-picked from #1797) #1888

Merged
merged 1 commit into from
Aug 26, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions source/Guides/Ament-CMake-Documentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ When building a reusable library, some information needs to be exported for down

.. code-block:: cmake

ament_export_targets(export_my_library HAS_LIBRARY_TARGET)
ament_export_targets(my_libraryTargets HAS_LIBRARY_TARGET)
ament_export_dependencies(some_dependency)

install(
Expand All @@ -141,7 +141,7 @@ When building a reusable library, some information needs to be exported for down

install(
TARGETS my_library
EXPORT export_my_library
EXPORT my_libraryTargets
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
Expand Down Expand Up @@ -183,7 +183,7 @@ Here is what's happening in the snippet above:
It installs the CMake files for the ``my_library`` target.
It is named exactly like the argument in ``ament_export_targets`` and could be named like the library.
However, this will then prohibit using the ``ament_target_dependencies`` way of including your library.
To allow for full flexibility, it is advised to prepend the export target with something like ``export_<target>``.
To allow for full flexibility, it is advised to prepend the export target with something like ``<target>Targets``.

- All install paths are relative to ``CMAKE_INSTALL_PREFIX``, which is already set correctly by colcon/ament

Expand Down