diff options
author | Brad King <brad.king@kitware.com> | 2017-06-12 14:57:00 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-06-12 15:47:30 (GMT) |
commit | 3d00be13ee04a48be1a6d0d64057494839e1df6f (patch) | |
tree | 415b7bcfcf2bc0d4df1dcd2766a378c008b61884 /Modules/Platform/Android-Initialize.cmake | |
parent | a131316a95fde7ae19ec851369d9a186e6488d0c (diff) | |
download | CMake-3d00be13ee04a48be1a6d0d64057494839e1df6f.zip CMake-3d00be13ee04a48be1a6d0d64057494839e1df6f.tar.gz CMake-3d00be13ee04a48be1a6d0d64057494839e1df6f.tar.bz2 |
Android: Add support for unified headers
The unified headers are preferred as of NDK r15, so use them by default
if available and provide an option to use the deprecated headers.
Inspired-by: Florent Castelli <florent.castelli@gmail.com>
Fixes: #16584
Diffstat (limited to 'Modules/Platform/Android-Initialize.cmake')
-rw-r--r-- | Modules/Platform/Android-Initialize.cmake | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/Platform/Android-Initialize.cmake b/Modules/Platform/Android-Initialize.cmake index a327223..a434f90 100644 --- a/Modules/Platform/Android-Initialize.cmake +++ b/Modules/Platform/Android-Initialize.cmake @@ -20,6 +20,9 @@ endif() if(NOT CMAKE_SYSROOT) if(CMAKE_ANDROID_NDK) set(CMAKE_SYSROOT "${CMAKE_ANDROID_NDK}/platforms/android-${CMAKE_SYSTEM_VERSION}/arch-${CMAKE_ANDROID_ARCH}") + if(NOT CMAKE_ANDROID_NDK_DEPRECATED_HEADERS) + set(CMAKE_SYSROOT_COMPILE "${CMAKE_ANDROID_NDK}/sysroot") + endif() elseif(CMAKE_ANDROID_STANDALONE_TOOLCHAIN) set(CMAKE_SYSROOT "${CMAKE_ANDROID_STANDALONE_TOOLCHAIN}/sysroot") endif() |