summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/Android/ndk-stl-gnustl.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-06-02 19:19:20 (GMT)
committerBrad King <brad.king@kitware.com>2016-08-23 16:53:10 (GMT)
commitd7d4083025f3007b862dd500c8f5fc64e105055b (patch)
treeb93117274170ae3b0a4871f8a394974ccefa3e67 /Modules/Platform/Android/ndk-stl-gnustl.cmake
parentb22294bc41c3ce62e561c7123c3f489a750dcb66 (diff)
downloadCMake-d7d4083025f3007b862dd500c8f5fc64e105055b.zip
CMake-d7d4083025f3007b862dd500c8f5fc64e105055b.tar.gz
CMake-d7d4083025f3007b862dd500c8f5fc64e105055b.tar.bz2
Android: Select the STL type for NDK builds
Populate standard include directories and link libraries for the platform. Select the STL corresponding to CMAKE_ANDROID_STL_TYPE and matching the current ABI and toolchain to be used. Refer to the NDK sources/cxx-stl/*/Android.mk files for the needed file locations.
Diffstat (limited to 'Modules/Platform/Android/ndk-stl-gnustl.cmake')
-rw-r--r--Modules/Platform/Android/ndk-stl-gnustl.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/Modules/Platform/Android/ndk-stl-gnustl.cmake b/Modules/Platform/Android/ndk-stl-gnustl.cmake
new file mode 100644
index 0000000..b3226ee
--- /dev/null
+++ b/Modules/Platform/Android/ndk-stl-gnustl.cmake
@@ -0,0 +1,9 @@
+# <ndk>/sources/cxx-stl/gnu-libstdc++/Android.mk
+set(_ANDROID_STL_RTTI 1)
+set(_ANDROID_STL_EXCEPTIONS 1)
+macro(__android_stl_gnustl lang filename)
+ __android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${CMAKE_${lang}_ANDROID_TOOLCHAIN_VERSION}/include" 1)
+ __android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${CMAKE_${lang}_ANDROID_TOOLCHAIN_VERSION}/libs/${CMAKE_ANDROID_ARCH_ABI}/include" 1)
+ __android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${CMAKE_${lang}_ANDROID_TOOLCHAIN_VERSION}/include/backward" 1)
+ __android_stl_lib(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${CMAKE_${lang}_ANDROID_TOOLCHAIN_VERSION}/libs/${CMAKE_ANDROID_ARCH_ABI}/${filename}" 1)
+endmacro()