summaryrefslogtreecommitdiff
path: root/Modules/Platform/Android/ndk-stl-c++.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/Platform/Android/ndk-stl-c++.cmake')
-rw-r--r--Modules/Platform/Android/ndk-stl-c++.cmake20
1 files changed, 20 insertions, 0 deletions
diff --git a/Modules/Platform/Android/ndk-stl-c++.cmake b/Modules/Platform/Android/ndk-stl-c++.cmake
new file mode 100644
index 000000000..a12411c78
--- /dev/null
+++ b/Modules/Platform/Android/ndk-stl-c++.cmake
@@ -0,0 +1,20 @@
+# <ndk>/sources/cxx-stl/llvm-libc++/Android.mk
+set(_ANDROID_STL_RTTI 1)
+set(_ANDROID_STL_EXCEPTIONS 1)
+macro(__android_stl_cxx lang filename)
+ # Add the include directory.
+ 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 the library file.
+ __android_stl_lib(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libs/${CMAKE_ANDROID_ARCH_ABI}/${filename}" 1)
+endmacro()