summaryrefslogtreecommitdiffstats
path: root/Help/command/find_package.rst
diff options
context:
space:
mode:
authorDavid Aguilar <davvid@gmail.com>2018-12-21 00:41:04 (GMT)
committerBrad King <brad.king@kitware.com>2019-01-16 14:59:46 (GMT)
commita5e948a36f5d1c1cf6a0ea34b04bbc4b6058e7d9 (patch)
treebc00d06b51f88ef5776b106f6be786319e18bc68 /Help/command/find_package.rst
parentc59eae7ebc5423c2b06befd762f8639b0f23b7a0 (diff)
downloadCMake-a5e948a36f5d1c1cf6a0ea34b04bbc4b6058e7d9.zip
CMake-a5e948a36f5d1c1cf6a0ea34b04bbc4b6058e7d9.tar.gz
CMake-a5e948a36f5d1c1cf6a0ea34b04bbc4b6058e7d9.tar.bz2
find_package: optionally resolve symlinks when discovering packages
Teach find_package() to resolve symlinks when constructing relocatable prefix paths from discovered cmake config files. The `CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS` variable enables this behavior when set to `TRUE`. Fixes: #18704
Diffstat (limited to 'Help/command/find_package.rst')
-rw-r--r--Help/command/find_package.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/Help/command/find_package.rst b/Help/command/find_package.rst
index cafef8c..54d5f68 100644
--- a/Help/command/find_package.rst
+++ b/Help/command/find_package.rst
@@ -354,6 +354,11 @@ enabled.
.. include:: FIND_XXX_ROOT.txt
.. include:: FIND_XXX_ORDER.txt
+By default the value stored in the result variable will be the path at
+which the file is found. The :variable:`CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS`
+variable may be set to ``TRUE`` before calling ``find_package`` in order
+to resolve symbolic links and store the real path to the file.
+
Every non-REQUIRED ``find_package`` call can be disabled by setting the
:variable:`CMAKE_DISABLE_FIND_PACKAGE_<PackageName>` variable to ``TRUE``.