<PackageName>_ROOT¶
在 3.12 版被加入.
這是一個 CMake 環境變數。其初始值取自呼叫進程的環境。
Calls to find_package(<PackageName>) will search in prefixes
specified by the <PackageName>_ROOT environment variable, where
<PackageName> is the (case-preserved) name given to the
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 CMP0074.
該變數可持有單一前綴或者以 UNIX 上的 : 或 Windows 上的 ; 分隔的前綴列表(與這些平臺上的 PATH 環境變數慣例相同)。
另請參見 <PackageName>_ROOT CMake 變數。
- <PACKAGENAME>_ROOT¶
在 3.27 版被加入.
Calls to
find_package(<PackageName>)will also search in prefixes specified by the upper-case<PACKAGENAME>_ROOTenvironment variable. See policyCMP0144.
備註
Note that the <PackageName>_ROOT and <PACKAGENAME>_ROOT
environment variables are distinct only on platforms that have
case-sensitive environments.