summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt16
1 files changed, 12 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2d25cc3a9..1771b063c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -106,12 +106,20 @@ endif()
if (YUZU_USE_BUNDLED_VCPKG)
if (ANDROID)
- set(VCPKG_TARGET_TRIPLET "arm64-android")
set(ENV{ANDROID_NDK_HOME} "${ANDROID_NDK}")
- # this is to avoid CMake using the host pkg-config to find the host
- # libraries when building for Android targets
- set(PKG_CONFIG_EXECUTABLE "aarch64-none-linux-android-pkg-config" CACHE FILEPATH "" FORCE)
list(APPEND VCPKG_MANIFEST_FEATURES "android")
+
+ if (CMAKE_ANDROID_ARCH_ABI STREQUAL "arm64-v8a")
+ set(VCPKG_TARGET_TRIPLET "arm64-android")
+ # this is to avoid CMake using the host pkg-config to find the host
+ # libraries when building for Android targets
+ set(PKG_CONFIG_EXECUTABLE "aarch64-none-linux-android-pkg-config" CACHE FILEPATH "" FORCE)
+ elseif (CMAKE_ANDROID_ARCH_ABI STREQUAL "x86_64")
+ set(VCPKG_TARGET_TRIPLET "x64-android")
+ set(PKG_CONFIG_EXECUTABLE "x86_64-none-linux-android-pkg-config" CACHE FILEPATH "" FORCE)
+ else()
+ message(FATAL_ERROR "Unsupported Android architecture ${CMAKE_ANDROID_ARCH_ABI}")
+ endif()
endif()
if (YUZU_TESTS)