summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-05-31 13:26:52 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-05-31 13:27:05 (GMT)
commit3332fdab9daefe0cc1de8cf50dc8cd78dfe221b0 (patch)
treed018d0a33eb63d0be4ffb8584c6ab8290fbe0596 /Help
parent99bda1d54805155fcf1747a6f5a9c31fd8e86f37 (diff)
parentaef057d0e8375f028dee025501814d282771c32a (diff)
downloadCMake-3332fdab9daefe0cc1de8cf50dc8cd78dfe221b0.zip
CMake-3332fdab9daefe0cc1de8cf50dc8cd78dfe221b0.tar.gz
CMake-3332fdab9daefe0cc1de8cf50dc8cd78dfe221b0.tar.bz2
Merge topic 'help-importing-exporting-lib'
aef057d0e8 Help/guide: fix MathFunctionsTargets.cmake path in importing-exporting Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !8511
Diffstat (limited to 'Help')
-rw-r--r--Help/guide/importing-exporting/index.rst9
1 files changed, 5 insertions, 4 deletions
diff --git a/Help/guide/importing-exporting/index.rst b/Help/guide/importing-exporting/index.rst
index 51a09c0..b1812c1 100644
--- a/Help/guide/importing-exporting/index.rst
+++ b/Help/guide/importing-exporting/index.rst
@@ -285,9 +285,9 @@ command.
:end-before: # include CMakePackageConfigHelpers macro
This command generates the ``MathFunctionsTargets.cmake`` file and arranges
-to install it to ``lib/cmake``. The file contains code suitable for
-use by downstreams to import all targets listed in the install command from
-the installation tree.
+to install it to ``${CMAKE_INSTALL_LIBDIR}/cmake/MathFunctions``. The file
+contains code suitable for use by downstreams to import all targets listed in
+the install command from the installation tree.
The ``NAMESPACE`` option will prepend ``MathFunctions::`` to the target names
as they are written to the export file. This convention of double-colons
@@ -317,7 +317,8 @@ were built in its own tree. For example:
.. code-block:: cmake
:linenos:
- include(${INSTALL_PREFIX}/lib/cmake/MathFunctionTargets.cmake)
+ include(GNUInstallDirs)
+ include(${INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/cmake/MathFunctions/MathFunctionTargets.cmake)
add_executable(myexe src1.c src2.c )
target_link_libraries(myexe PRIVATE MathFunctions::MathFunctions)