summaryrefslogtreecommitdiffstats
path: root/Help/envvar
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/envvar
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/envvar')
-rw-r--r--Help/envvar/PackageName_ROOT.rst14
1 files changed, 14 insertions, 0 deletions
diff --git a/Help/envvar/PackageName_ROOT.rst b/Help/envvar/PackageName_ROOT.rst
index fa8c385..6e9c744 100644
--- a/Help/envvar/PackageName_ROOT.rst
+++ b/Help/envvar/PackageName_ROOT.rst
@@ -17,3 +17,17 @@ by ``:`` on UNIX or ``;`` on Windows (the same as the ``PATH`` environment
variable convention on those platforms).
See also the :variable:`<PackageName>_ROOT` CMake variable.
+
+.. envvar:: <PACKAGENAME>_ROOT
+
+ .. versionadded:: 3.27
+
+ Calls to :command:`find_package(<PackageName>)` will also search in
+ prefixes specified by the upper-case ``<PACKAGENAME>_ROOT`` environment
+ variable. See policy :policy:`CMP0144`.
+
+.. note::
+
+ Note that the ``<PackageName>_ROOT`` and ``<PACKAGENAME>_ROOT``
+ environment variables are distinct only on platforms that have
+ case-sensitive environments.