2013-11-26 22:58:07 +04:00
|
|
|
The CMake variable :variable:`CMAKE_FIND_ROOT_PATH` specifies one or more
|
2013-10-01 20:37:02 +04:00
|
|
|
directories to be prepended to all other search directories. This
|
2013-11-14 15:04:40 +04:00
|
|
|
effectively "re-roots" the entire search under given locations.
|
|
|
|
Paths which are descendants of the :variable:`CMAKE_STAGING_PREFIX` are excluded
|
|
|
|
from this re-rooting, because that variable is always a path on the host system.
|
2013-11-26 22:58:07 +04:00
|
|
|
By default the :variable:`CMAKE_FIND_ROOT_PATH` is empty.
|
2013-04-13 16:46:57 +04:00
|
|
|
|
|
|
|
The :variable:`CMAKE_SYSROOT` variable can also be used to specify exactly one
|
|
|
|
directory to use as a prefix. Setting :variable:`CMAKE_SYSROOT` also has other
|
|
|
|
effects. See the documentation for that variable for more.
|
|
|
|
|
|
|
|
These variables are especially useful when cross-compiling to
|
2013-10-01 20:37:02 +04:00
|
|
|
point to the root directory of the target environment and CMake will
|
|
|
|
search there too. By default at first the directories listed in
|
2013-11-26 22:58:07 +04:00
|
|
|
:variable:`CMAKE_FIND_ROOT_PATH` are searched, then the :variable:`CMAKE_SYSROOT`
|
|
|
|
directory is searched, and then the non-rooted directories will be
|
2013-10-01 20:37:02 +04:00
|
|
|
searched. The default behavior can be adjusted by setting
|
|
|
|
|CMAKE_FIND_ROOT_PATH_MODE_XXX|. This behavior can be manually
|
2015-06-08 22:52:21 +03:00
|
|
|
overridden on a per-call basis using options:
|
|
|
|
|
|
|
|
``CMAKE_FIND_ROOT_PATH_BOTH``
|
|
|
|
Search in the order described above.
|
|
|
|
|
|
|
|
``NO_CMAKE_FIND_ROOT_PATH``
|
|
|
|
Do not use the :variable:`CMAKE_FIND_ROOT_PATH` variable.
|
|
|
|
|
|
|
|
``ONLY_CMAKE_FIND_ROOT_PATH``
|
|
|
|
Search only the re-rooted directories and directories below
|
|
|
|
:variable:`CMAKE_STAGING_PREFIX`.
|