mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 01:59:00 +08:00
Fixed android toolchain with newest NDK (#21465)
* Fixed android toolchain with newest NDK ANDROID_NATIVE_API_LEVEL has been removed from NDK cmake toolchain so we now have to use ANDROID_PLATFORM * Fix android toolchain: Maintain backward compatibility for older NDK
This commit is contained in:
parent
46ad6d4a07
commit
be65fbbf75
@ -2,6 +2,11 @@ set(ANDROID_CPP_FEATURES "rtti exceptions" CACHE STRING "")
|
||||
set(CMAKE_SYSTEM_NAME Android CACHE STRING "")
|
||||
set(ANDROID_TOOLCHAIN clang CACHE STRING "")
|
||||
set(ANDROID_NATIVE_API_LEVEL ${CMAKE_SYSTEM_VERSION} CACHE STRING "")
|
||||
if(CMAKE_SYSTEM_VERSION MATCHES "^[0-9]+$")
|
||||
set(ANDROID_PLATFORM android-${CMAKE_SYSTEM_VERSION} CACHE STRING "")
|
||||
else()
|
||||
set(ANDROID_PLATFORM ${CMAKE_SYSTEM_VERSION} CACHE STRING "")
|
||||
endif()
|
||||
set(CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION clang CACHE STRING "")
|
||||
|
||||
if (VCPKG_TARGET_TRIPLET MATCHES "^arm64-android")
|
||||
|
Loading…
Reference in New Issue
Block a user