Skip to content

Commit

Permalink
update android.toolchain.cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
nihui committed Aug 9, 2017
1 parent a93e26d commit 0b50826
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions android.toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ set( ANDROID_SUPPORTED_ABIS_mips "mips" )
set( ANDROID_SUPPORTED_ABIS_mips64 "mips64" )

# API level defaults
set( ANDROID_DEFAULT_NDK_API_LEVEL 8 )
set( ANDROID_DEFAULT_NDK_API_LEVEL 9 )
set( ANDROID_DEFAULT_NDK_API_LEVEL_arm64 21 )
set( ANDROID_DEFAULT_NDK_API_LEVEL_x86 9 )
set( ANDROID_DEFAULT_NDK_API_LEVEL_x86_64 21 )
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -1151,8 +1150,10 @@ if( APPLE )
endif()

# Force set compilers because standard identification works badly for us
include( CMakeForceCompiler )
CMAKE_FORCE_C_COMPILER( "${CMAKE_C_COMPILER}" GNU )
if( CMAKE_VERSION VERSION_LESS 3.5.0 )
include( CMakeForceCompiler )
CMAKE_FORCE_C_COMPILER( "${CMAKE_C_COMPILER}" GNU )
endif()
if( ANDROID_COMPILER_IS_CLANG )
set( CMAKE_C_COMPILER_ID Clang )
endif()
Expand All @@ -1164,7 +1165,9 @@ else()
endif()
set( CMAKE_C_HAS_ISYSROOT 1 )
set( CMAKE_C_COMPILER_ABI ELF )
CMAKE_FORCE_CXX_COMPILER( "${CMAKE_CXX_COMPILER}" GNU )
if( CMAKE_VERSION VERSION_LESS 3.5.0 )
CMAKE_FORCE_CXX_COMPILER( "${CMAKE_CXX_COMPILER}" GNU )
endif()
if( ANDROID_COMPILER_IS_CLANG )
set( CMAKE_CXX_COMPILER_ID Clang)
endif()
Expand Down

0 comments on commit 0b50826

Please sign in to comment.