PackageName_ROOT.rst 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. <PackageName>_ROOT
  2. ------------------
  3. .. versionadded:: 3.12
  4. .. include:: ENV_VAR.txt
  5. Calls to :command:`find_package(<PackageName>)` will search in prefixes
  6. specified by the ``<PackageName>_ROOT`` environment variable, where
  7. ``<PackageName>`` is the (case-preserved) name given to the
  8. :command:`find_package` call and ``_ROOT`` is literal.
  9. For example, ``find_package(Foo)`` will search prefixes specified in the
  10. ``Foo_ROOT`` environment variable (if set). See policy :policy:`CMP0074`.
  11. This variable may hold a single prefix or a list of prefixes separated
  12. by ``:`` on UNIX or ``;`` on Windows (the same as the ``PATH`` environment
  13. variable convention on those platforms).
  14. See also the :variable:`<PackageName>_ROOT` CMake variable.
  15. .. envvar:: <PACKAGENAME>_ROOT
  16. .. versionadded:: 3.27
  17. Calls to :command:`find_package(<PackageName>)` will also search in
  18. prefixes specified by the upper-case ``<PACKAGENAME>_ROOT`` environment
  19. variable. See policy :policy:`CMP0144`.
  20. .. note::
  21. Note that the ``<PackageName>_ROOT`` and ``<PACKAGENAME>_ROOT``
  22. environment variables are distinct only on platforms that have
  23. case-sensitive environments.