mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 13:20:47 -06:00
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
34 lines
1.1 KiB
ReStructuredText
34 lines
1.1 KiB
ReStructuredText
<PackageName>_ROOT
|
|
------------------
|
|
|
|
.. versionadded:: 3.12
|
|
|
|
.. include:: ENV_VAR.txt
|
|
|
|
Calls to :command:`find_package(<PackageName>)` will search in prefixes
|
|
specified by the ``<PackageName>_ROOT`` environment variable, where
|
|
``<PackageName>`` is the (case-preserved) name given to the
|
|
:command:`find_package` call and ``_ROOT`` is literal.
|
|
For example, ``find_package(Foo)`` will search prefixes specified in the
|
|
``Foo_ROOT`` environment variable (if set). See policy :policy:`CMP0074`.
|
|
|
|
This variable may hold a single prefix or a list of prefixes separated
|
|
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.
|