summaryrefslogtreecommitdiffstats
path: root/Help/command
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-02-21 21:00:24 (GMT)
committerBrad King <brad.king@kitware.com>2023-02-23 14:15:14 (GMT)
commitdf9c4b18720c6c8263c13641bc0a6452138d6fba (patch)
tree4301ddaee071056517ef6a0964d34e2627738987 /Help/command
parent4da27a73bd10665e753194a4a14323c9069e9289 (diff)
downloadCMake-df9c4b18720c6c8263c13641bc0a6452138d6fba.zip
CMake-df9c4b18720c6c8263c13641bc0a6452138d6fba.tar.gz
CMake-df9c4b18720c6c8263c13641bc0a6452138d6fba.tar.bz2
find_package: Use <PACKAGENAME>_ROOT variables as search prefixes
Extend commit eb35d8884b (find_package: Use PackageName_ROOT variables as search prefixes, 2018-03-15, v3.12.0-rc1~349^2) to also check upper-case `<PACKAGENAME>_ROOT` variables. Add policy `CMP0144` to enable the behavior in a compatible way. Fixes: #24403
Diffstat (limited to 'Help/command')
-rw-r--r--Help/command/FIND_XXX.txt14
-rw-r--r--Help/command/find_package.rst14
2 files changed, 26 insertions, 2 deletions
diff --git a/Help/command/FIND_XXX.txt b/Help/command/FIND_XXX.txt
index 09df8ba..21236fa 100644
--- a/Help/command/FIND_XXX.txt
+++ b/Help/command/FIND_XXX.txt
@@ -151,9 +151,21 @@ If ``NO_DEFAULT_PATH`` is not specified, the search process is as follows:
a. :variable:`<PackageName>_ROOT` CMake variable,
where ``<PackageName>`` is the case-preserved package name.
- b. :envvar:`<PackageName>_ROOT` environment variable,
+ b. :variable:`<PACKAGENAME>_ROOT` CMake variable,
+ where ``<PACKAGENAME>`` is the upper-cased package name.
+ See policy :policy:`CMP0144`.
+
+ .. versionadded:: 3.27
+
+ c. :envvar:`<PackageName>_ROOT` environment variable,
where ``<PackageName>`` is the case-preserved package name.
+ d. :envvar:`<PACKAGENAME>_ROOT` environment variable,
+ where ``<PACKAGENAME>`` is the upper-cased package name.
+ See policy :policy:`CMP0144`.
+
+ .. versionadded:: 3.27
+
The package root variables are maintained as a stack, so if called from
nested find modules or config packages, root paths from the parent's find
module or config package will be searched after paths from the current
diff --git a/Help/command/find_package.rst b/Help/command/find_package.rst
index 0162a1e..b82088e 100644
--- a/Help/command/find_package.rst
+++ b/Help/command/find_package.rst
@@ -378,9 +378,21 @@ enabled.
a. :variable:`<PackageName>_ROOT` CMake variable,
where ``<PackageName>`` is the case-preserved package name.
- b. :envvar:`<PackageName>_ROOT` environment variable,
+ b. :variable:`<PACKAGENAME>_ROOT` CMake variable,
+ where ``<PACKAGENAME>`` is the upper-cased package name.
+ See policy :policy:`CMP0144`.
+
+ .. versionadded:: 3.27
+
+ c. :envvar:`<PackageName>_ROOT` environment variable,
where ``<PackageName>`` is the case-preserved package name.
+ d. :envvar:`<PACKAGENAME>_ROOT` environment variable,
+ where ``<PACKAGENAME>`` is the upper-cased package name.
+ See policy :policy:`CMP0144`.
+
+ .. versionadded:: 3.27
+
The package root variables are maintained as a stack so if
called from within a find module, root paths from the parent's find
module will also be searched after paths for the current package.