Fix android libc++ build
authorMatthew Cook <matthew@cook.run>
Fri, 26 Aug 2016 03:18:35 +0000 (15:18 +1200)
committerMatthew Cook <matthew@cook.run>
Thu, 1 Sep 2016 22:25:46 +0000 (10:25 +1200)
3rdparty/carotene/src/common.hpp
platforms/android/android.toolchain.cmake

index e46231a..823ddf1 100644 (file)
@@ -41,6 +41,7 @@
 #define CAROTENE_SRC_COMMON_HPP
 
 #include <cstddef>
+#include <cstdlib>
 #include <algorithm>
 
 #if defined WITH_NEON && (defined __ARM_NEON__ || defined __ARM_NEON)
index e0b4bf8..1d69b75 100644 (file)
@@ -1048,8 +1048,7 @@ if( BUILD_WITH_ANDROID_NDK )
   set( ANDROID_RTTI             ON )
   set( __libstl                "${ANDROID_NDK}/sources/cxx-stl/llvm-libc++" )
   set( __libstl                "${__libstl}/libs/${ANDROID_NDK_ABI_NAME}/libc++_static.a" )
-  set( __libgnustl             "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${ANDROID_COMPILER_VERSION}" )
-  set( ANDROID_STL_INCLUDE_DIRS "${__libgnustl}/include" "${__libgnustl}/libs/${ANDROID_NDK_ABI_NAME}/include" "${__libgnustl}/include/backward" )
+  set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_NDK}/sources/android/support/include" "${ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libcxx/include" "${ANDROID_NDK}/sources/cxx-stl/llvm-libc++abi/libcxxabi/include" )
  else()
   message( FATAL_ERROR "Unknown runtime: ${ANDROID_STL}" )
  endif()