blob: d9806e340b0464f9e9b18e73b35bfed862b2cff8 [file] [log] [blame]
set(CMAKE_SYSTEM_NAME Android)
if(NOT $ENV{ANDROID_HOME} STREQUAL "")
set(CMAKE_ANDROID_NDK $ENV{ANDROID_HOME}/ndk-bundle)
else()
set(CMAKE_ANDROID_NDK $ENV{HOME}/Android/Sdk/ndk-bundle)
endif()
set(CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION clang)
set(CMAKE_ANDROID_ARCH_ABI arm64-v8a)
set(CMAKE_ANDROID_STL_TYPE c++_shared)
if(APPLE)
set(CMAKE_RANLIB "${CMAKE_ANDROID_NDK}/toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64/aarch64-linux-android/bin/ranlib")
set(CMAKE_AR "${CMAKE_ANDROID_NDK}/toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64/aarch64-linux-android/bin/ar")
endif()