Android: Fix support for cxxabi.h with libc++
Additional include directories are needed for this on some STL types. Closes: #16350
This commit is contained in:
parent
0c3a04777c
commit
8cdac469d1
|
@ -6,9 +6,11 @@ macro(__android_stl_cxx lang filename)
|
||||||
if(EXISTS "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libcxx/include/cstddef")
|
if(EXISTS "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libcxx/include/cstddef")
|
||||||
# r12 and below
|
# 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/cxx-stl/llvm-libc++/libcxx/include" 1)
|
||||||
|
__android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++abi/libcxxabi/include" 1)
|
||||||
else()
|
else()
|
||||||
# r13 and above
|
# 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/cxx-stl/llvm-libc++/include" 1)
|
||||||
|
__android_stl_inc(${lang} "${CMAKE_ANDROID_NDK}/sources/cxx-stl/llvm-libc++abi/include" 1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Add a secondary include directory if it exists.
|
# Add a secondary include directory if it exists.
|
||||||
|
|
|
@ -6,6 +6,9 @@
|
||||||
#ifndef STL_SYSTEM
|
#ifndef STL_SYSTEM
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <typeinfo>
|
#include <typeinfo>
|
||||||
|
#ifndef STL_STLPORT
|
||||||
|
#include <cxxabi.h>
|
||||||
|
#endif
|
||||||
#ifndef STL_GABI
|
#ifndef STL_GABI
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
|
@ -43,6 +43,8 @@ elseif(CMAKE_ANDROID_STL_TYPE STREQUAL "system")
|
||||||
add_definitions(-DSTL_SYSTEM)
|
add_definitions(-DSTL_SYSTEM)
|
||||||
elseif(CMAKE_ANDROID_STL_TYPE MATCHES [[^gabi\+\+]])
|
elseif(CMAKE_ANDROID_STL_TYPE MATCHES [[^gabi\+\+]])
|
||||||
add_definitions(-DSTL_GABI)
|
add_definitions(-DSTL_GABI)
|
||||||
|
elseif(CMAKE_ANDROID_STL_TYPE MATCHES [[^stlport]])
|
||||||
|
add_definitions(-DSTL_STLPORT)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
string(REPLACE "-" "_" abi "${CMAKE_ANDROID_ARCH_ABI}")
|
string(REPLACE "-" "_" abi "${CMAKE_ANDROID_ARCH_ABI}")
|
||||||
|
|
Loading…
Reference in New Issue