summaryrefslogtreecommitdiffstats
path: root/Modules/Platform
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-06-09 20:42:13 (GMT)
committerBrad King <brad.king@kitware.com>2017-06-09 20:42:13 (GMT)
commita131316a95fde7ae19ec851369d9a186e6488d0c (patch)
treee71ac4f97eb8d706cd56a3d85291db1ed7b97e32 /Modules/Platform
parentf83d3e3f2ccf795e47cdb0f41969c11aef897207 (diff)
parent22f8a465d7de84b246f6d5ec0e05984b5610122f (diff)
downloadCMake-a131316a95fde7ae19ec851369d9a186e6488d0c.zip
CMake-a131316a95fde7ae19ec851369d9a186e6488d0c.tar.gz
CMake-a131316a95fde7ae19ec851369d9a186e6488d0c.tar.bz2
Merge branch 'android-standalone-no-sysroot-include' into release-3.9
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()