summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/Android/ndk-stl-c++.cmake
blob: cb9fd68374348374ed438418907f8a9759d3b44f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# <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)
  else()
    # r13 and above
    __android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++/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()