ndk-stl-c++.cmake 1.1 KB

123456789101112131415161718192021
  1. # <ndk>/sources/cxx-stl/llvm-libc++/Android.mk
  2. set(_ANDROID_STL_RTTI 1)
  3. set(_ANDROID_STL_EXCEPTIONS 1)
  4. set(_ANDROID_STL_NOSTDLIBXX 1)
  5. macro(__android_stl_cxx lang filename)
  6. # Add the include directory.
  7. if(EXISTS "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libcxx/include/cstddef")
  8. # r12 and below
  9. __android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libcxx/include" 1)
  10. __android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/android/support/include" 0)
  11. __android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++abi/libcxxabi/include" 1)
  12. else()
  13. # r13 and above
  14. __android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++/include" 1)
  15. __android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/android/support/include" 0)
  16. __android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++abi/include" 1)
  17. endif()
  18. # Add the library file.
  19. __android_stl_lib(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libs/${CMAKE_ANDROID_ARCH_ABI}/${filename}" 1)
  20. endmacro()