From 19112213c38e29090d633266ca29953c3ca561e2 Mon Sep 17 00:00:00 2001 From: Tyler Weaver Date: Thu, 26 Aug 2021 12:58:11 -0600 Subject: [PATCH] Use common convention for EXPORT name (#1797) As @JafarAbdi pointed out in [this PR](https://github.com/ros-planning/srdfdom/pull/96#discussion_r682809159) the _exports suffix is non-standard. `Targets` or `-targets` is used by gtest, fmt, and nlohmann_json. I copied the _exports suffix into the moveit2 repo and now regret it. It would be nice to use common conventions here so others don't make the same mistake. (cherry picked from commit 1c5fc42cbc11989a101b99ddfed2b6cade8b1c22) --- source/Guides/Ament-CMake-Documentation.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/Guides/Ament-CMake-Documentation.rst b/source/Guides/Ament-CMake-Documentation.rst index 30ce75ede9..a3c0d0f2f2 100644 --- a/source/Guides/Ament-CMake-Documentation.rst +++ b/source/Guides/Ament-CMake-Documentation.rst @@ -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( @@ -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 @@ -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_``. + To allow for full flexibility, it is advised to prepend the export target with something like ``Targets``. - All install paths are relative to ``CMAKE_INSTALL_PREFIX``, which is already set correctly by colcon/ament