mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 18:31:15 +08:00
Support custom Android NDK, better ABI specification (#4986)
This commit is contained in:
parent
c094d3133c
commit
b2996e1fd4
@ -1,11 +1,22 @@
|
||||
|
||||
set(ANDROID_CPP_FEATURES "rtti exceptions" CACHE STRING "")
|
||||
set(CMAKE_SYSTEM_NAME Android CACHE STRING "")
|
||||
set(ANDROID_ABI x86_64 CACHE STRING "")
|
||||
set(ANDROID_TOOLCHAIN clang CACHE STRING "")
|
||||
set(ANDROID_NATIVE_API_LEVEL 21 CACHE STRING "")
|
||||
set(CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION clang CACHE STRING "")
|
||||
|
||||
if (VCPKG_TARGET_TRIPLET STREQUAL "arm64-android")
|
||||
set(ANDROID_ABI arm64-v8a CACHE STRING "")
|
||||
elseif(VCPKG_TARGET_TRIPLET STREQUAL "arm-android")
|
||||
set(ANDROID_ABI armeabi-v7a CACHE STRING "")
|
||||
elseif(VCPKG_TARGET_TRIPLET STREQUAL "x64-android")
|
||||
set(ANDROID_ABI x86_64 CACHE STRING "")
|
||||
elseif(VCPKG_TARGET_TRIPLET STREQUAL "x86-android")
|
||||
set(ANDROID_ABI x86 CACHE STRING "")
|
||||
else()
|
||||
message(FATAL_ERROR "Unknown ABI for target triplet ${VCPKG_TARGET_TRIPLET}")
|
||||
endif()
|
||||
|
||||
if(DEFINED ENV{ANDROID_NDK_HOME})
|
||||
set(ANDROID_NDK_HOME $ENV{ANDROID_NDK_HOME})
|
||||
else()
|
||||
|
@ -170,6 +170,8 @@ namespace vcpkg::System
|
||||
L"NVCUDASAMPLES_ROOT",
|
||||
// Enables find_package(Vulkan) in CMake. Environmental variable generated by Vulkan SDK installer
|
||||
L"VULKAN_SDK",
|
||||
// Enable targeted Android NDK
|
||||
L"ANDROID_NDK_HOME",
|
||||
};
|
||||
|
||||
std::wstring env_cstr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user