summaryrefslogtreecommitdiffstats
path: root/Modules/Platform
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-06-12 14:23:17 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-06-12 14:23:22 (GMT)
commitf6ed92280c9af9e35dec9d1cff5d453e0758c0d5 (patch)
tree3e28149d0b7dea3d03e1459dd1a129df51655623 /Modules/Platform
parent637ff39d4554e581d87ade1bce39671c811ebd09 (diff)
parent22f8a465d7de84b246f6d5ec0e05984b5610122f (diff)
downloadCMake-f6ed92280c9af9e35dec9d1cff5d453e0758c0d5.zip
CMake-f6ed92280c9af9e35dec9d1cff5d453e0758c0d5.tar.gz
CMake-f6ed92280c9af9e35dec9d1cff5d453e0758c0d5.tar.bz2
Merge topic 'android-standalone-no-sysroot-include'
22f8a465 Android: Do not pass sysroot include for standalone toolchain Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !952
Diffstat (limited to 'Modules/Platform')
-rw-r--r--Modules/Platform/Android-Common.cmake9
1 files changed, 7 insertions, 2 deletions
diff --git a/Modules/Platform/Android-Common.cmake b/Modules/Platform/Android-Common.cmake
index cf2785a..78938dc 100644
--- a/Modules/Platform/Android-Common.cmake
+++ b/Modules/Platform/Android-Common.cmake
@@ -156,6 +156,11 @@ macro(__android_compiler_common lang)
# necessary so that Android API-version-specific headers are preferred
# over those in the toolchain's `include-fixed` directory (which cannot
# possibly match all versions).
- list(APPEND CMAKE_${lang}_STANDARD_INCLUDE_DIRECTORIES "${CMAKE_SYSROOT}/usr/include")
- list(REMOVE_ITEM CMAKE_${lang}_IMPLICIT_INCLUDE_DIRECTORIES "/usr/include")
+ #
+ # 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")
+ list(REMOVE_ITEM CMAKE_${lang}_IMPLICIT_INCLUDE_DIRECTORIES "/usr/include")
+ endif()
endmacro()