CMake/Help/variable/CMAKE_SYSROOT.rst
Brad King 53e89b6ab0 Add options for separate compile and link sysroots
Add `CMAKE_SYSROOT_COMPILE` and `CMAKE_SYSROOT_LINK` variables to as
operation-specific alternatives to `CMAKE_SYSROOT`.  This will be useful
for Android NDKs that compile and link with different sysroot values
(e.g. `r14` with unified headers).

Co-Author: Florent Castelli <florent.castelli@gmail.com>
2017-05-09 14:21:54 -04:00

16 lines
557 B
ReStructuredText

CMAKE_SYSROOT
-------------
Path to pass to the compiler in the ``--sysroot`` flag.
The ``CMAKE_SYSROOT`` content is passed to the compiler in the ``--sysroot``
flag, if supported. The path is also stripped from the RPATH/RUNPATH if
necessary on installation. The ``CMAKE_SYSROOT`` is also used to prefix
paths searched by the ``find_*`` commands.
This variable may only be set in a toolchain file specified by
the :variable:`CMAKE_TOOLCHAIN_FILE` variable.
See also the :variable:`CMAKE_SYSROOT_COMPILE` and
:variable:`CMAKE_SYSROOT_LINK` variables.