mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-23 14:48:19 -05:00
Add CMAKE_SYSROOT variable to set --sysroot when cross compiling.
As CMAKE_ROOT_FIND_PATH can be a list, a new CMAKE_SYSROOT is introduced, which is never a list. The contents of this variable is passed to supporting compilers as --sysroot. It is also accounted for when processing implicit link directories reported by the compiler, and when generating RPATH information.
This commit is contained in:
@@ -1,10 +1,17 @@
|
||||
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. By
|
||||
default it is empty. It is especially useful when cross-compiling to
|
||||
default it 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 and then the non-rooted directories will be
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user