7521da2852
This variable can be useful in cross-compiling contexts where the sysroot is read-only or where the sysroot should otherwise remain pristine. If the new CMAKE_STAGING_PREFIX variable is set, it is used instead of CMAKE_INSTALL_PREFIX when generating the installation rules in cmake_install.cmake. This way, the CMAKE_INSTALL_PREFIX variable always refers to the installation prefix on the target device, regardless of whether host==target. If any -rpath paths passed to the linker contain the CMAKE_STAGING_PREFIX, the matching path fragments are replaced with the CMAKE_INSTALL_PREFIX. Matching paths in the -rpath-link are not transformed. The cross-prefix usr-move workaround is assumed not to require extension regarding CMAKE_STAGING_PREFIX. The staging area is a single prefix, so there is no scope for cross-prefix symlinks. The CMAKE_INSTALL_PREFIX is still used to determine the workaround path, and that variable remains the relevant one even if CMAKE_STAGING_PREFIX is used. If the generated export files are deployed to the target, the workaround will still be in place, and still be employed if required.
24 lines
1.4 KiB
Plaintext
24 lines
1.4 KiB
Plaintext
The CMake variable CMAKE_FIND_ROOT_PATH specifies one or more
|
|
directories to be prepended to all other search directories. This
|
|
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.
|
|
By default the CMAKE_FIND_ROOT_PATH is empty.
|
|
|
|
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
|
|
point to the root directory of the target environment and CMake will
|
|
search there too. By default at first the directories listed in
|
|
CMAKE_FIND_ROOT_PATH are searched, then the :variable:`CMAKE_SYSROOT` directory is
|
|
searched, and then the non-rooted directories will be
|
|
searched. The default behavior can be adjusted by setting
|
|
|CMAKE_FIND_ROOT_PATH_MODE_XXX|. This behavior can be manually
|
|
overridden on a per-call basis. By using CMAKE_FIND_ROOT_PATH_BOTH
|
|
the search order will be as described above. If
|
|
NO_CMAKE_FIND_ROOT_PATH is used then CMAKE_FIND_ROOT_PATH will not be
|
|
used. If ONLY_CMAKE_FIND_ROOT_PATH is used then only the re-rooted
|
|
directories and directories below :variable:`CMAKE_STAGING_PREFIX` will be searched.
|