diff options
author | Brad King <brad.king@kitware.com> | 2017-01-20 20:39:27 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-01-20 20:39:27 (GMT) |
commit | 1806e011cb2608c7ef62f345661dd35a899eb81c (patch) | |
tree | 910b22698bd27700298ee0379d88a0b33cdd5122 | |
parent | 6b4b8e6a600e177d6bbe41848e7de58e7392c81a (diff) | |
download | CMake-1806e011cb2608c7ef62f345661dd35a899eb81c.zip CMake-1806e011cb2608c7ef62f345661dd35a899eb81c.tar.gz CMake-1806e011cb2608c7ef62f345661dd35a899eb81c.tar.bz2 |
Android: Fix c++_{static,shared} support include directory order
The NDK's own build files:
<ndk>/build/tools/build-cxx-stl.sh
<ndk>/build/cmake/android.toolchain.cmake
for the `c++_static` and `c++_shared` build types add the
`<ndk>/sources/android/support/include` include directory
between the two `<ndk>/sources/cxx-stl/llvm-libc++*` directories.
Re-order our own include directory generation to match.
Issue: #16536
-rw-r--r-- | Modules/Platform/Android/ndk-stl-c++.cmake | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Modules/Platform/Android/ndk-stl-c++.cmake b/Modules/Platform/Android/ndk-stl-c++.cmake index b27015d..a12411c 100644 --- a/Modules/Platform/Android/ndk-stl-c++.cmake +++ b/Modules/Platform/Android/ndk-stl-c++.cmake @@ -6,16 +6,15 @@ macro(__android_stl_cxx lang filename) if(EXISTS "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libcxx/include/cstddef") # r12 and below __android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libcxx/include" 1) + __android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/android/support/include" 0) __android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++abi/libcxxabi/include" 1) else() # r13 and above __android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++/include" 1) + __android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/android/support/include" 0) __android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++abi/include" 1) endif() - # Add a secondary include directory if it exists. - __android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/android/support/include" 0) - # Add the library file. __android_stl_lib(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libs/${CMAKE_ANDROID_ARCH_ABI}/${filename}" 1) endmacro() |