summaryrefslogtreecommitdiffstats
path: root/Modules/Platform
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-06-22 12:27:34 (GMT)
committerBrad King <brad.king@kitware.com>2017-06-22 12:28:44 (GMT)
commit5d317930230daf61c72c2fa4bdd7b74dbcd7b190 (patch)
treeeac6db5735e11ffd11bb48a156303b26384a6459 /Modules/Platform
parent3d00be13ee04a48be1a6d0d64057494839e1df6f (diff)
downloadCMake-5d317930230daf61c72c2fa4bdd7b74dbcd7b190.zip
CMake-5d317930230daf61c72c2fa4bdd7b74dbcd7b190.tar.gz
CMake-5d317930230daf61c72c2fa4bdd7b74dbcd7b190.tar.bz2
Android: Fix include path for unified headers
In commit v3.9.0-rc3~3^2 (Android: Add support for unified headers, 2017-06-12) we accidentally constructed the unified header include directories from the linking sysroot. Construct them from the compiling sysroot instead. Fixes: #16584
Diffstat (limited to 'Modules/Platform')
-rw-r--r--Modules/Platform/Android-Common.cmake8
1 files changed, 6 insertions, 2 deletions
diff --git a/Modules/Platform/Android-Common.cmake b/Modules/Platform/Android-Common.cmake
index ac72676..6360376 100644
--- a/Modules/Platform/Android-Common.cmake
+++ b/Modules/Platform/Android-Common.cmake
@@ -160,9 +160,13 @@ macro(__android_compiler_common lang)
# Do not do this for a standalone toolchain because it is already
# tied to a specific API version.
if(CMAKE_ANDROID_NDK)
- list(APPEND CMAKE_${lang}_STANDARD_INCLUDE_DIRECTORIES "${CMAKE_SYSROOT}/usr/include")
if(NOT CMAKE_ANDROID_NDK_DEPRECATED_HEADERS)
- list(APPEND CMAKE_${lang}_STANDARD_INCLUDE_DIRECTORIES "${CMAKE_SYSROOT}/usr/include/${CMAKE_ANDROID_ARCH_HEADER_TRIPLE}")
+ list(APPEND CMAKE_${lang}_STANDARD_INCLUDE_DIRECTORIES
+ "${CMAKE_SYSROOT_COMPILE}/usr/include"
+ "${CMAKE_SYSROOT_COMPILE}/usr/include/${CMAKE_ANDROID_ARCH_HEADER_TRIPLE}"
+ )
+ else()
+ list(APPEND CMAKE_${lang}_STANDARD_INCLUDE_DIRECTORIES "${CMAKE_SYSROOT}/usr/include")
endif()
list(REMOVE_ITEM CMAKE_${lang}_IMPLICIT_INCLUDE_DIRECTORIES "/usr/include")
endif()