Skip to content

Commit

Permalink
Add warning about CMake subdirectories to ament tutorial (ros2#934)
Browse files Browse the repository at this point in the history
Related to ament/ament_cmake#227.

Signed-off-by: Jacob Perron <[email protected]>
  • Loading branch information
jacobperron authored Dec 3, 2020
1 parent 74aef05 commit 36ace2a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions source/Tutorials/Ament-CMake-Documentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@ Here is what's happening in the snippet above:

- The first ``install`` commands installs the header files which should be available to clients.

.. warning::

Calling ``ament_export_targets``, ``ament_export_dependencies``, or other ament commands from a CMake subdirectory will not work as expected.
This is because the CMake subdirectory has no way of setting necessary variables in the parent scope where ``ament_package`` is called.

- The last large install command installs the library.
Archives and library files will be exported to the lib folder, runtime binaries will be installed to the bin folder and the path to installed headers is ``include``.

Expand Down

0 comments on commit 36ace2a

Please sign in to comment.