ndk-stl-c++.cmake 1.0 KB

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