cmake_minimum_required(VERSION 3.10.2)

if (ANDROID_ABI STREQUAL armeabi-v7a)
    set(AI_COMPILER_TARGET "armv7a-linux-androideabi${ANDROID_NATIVE_API_LEVEL}")
elseif (ANDROID_ABI STREQUAL arm64-v8a)
    set(AI_COMPILER_TARGET "aarch64-linux-android${ANDROID_NATIVE_API_LEVEL}")
elseif (ANDROID_ABI STREQUAL x86)
    set(AI_COMPILER_TARGET "i686-linux-android${ANDROID_NATIVE_API_LEVEL}")
elseif (ANDROID_ABI STREQUAL x86_64)
    set(AI_COMPILER_TARGET "x86_64-linux-android${ANDROID_NATIVE_API_LEVEL}")
endif ()

set(AI_CXX_COMPILER ${ANDROID_TOOLCHAIN_ROOT}/bin/${AI_COMPILER_TARGET}-clang++)
set(AI_CC_COMPILER ${ANDROID_TOOLCHAIN_ROOT}/bin/${AI_COMPILER_TARGET}-clang)
