From 616cf70a801ccf7c2312118d163185a8d341e517 Mon Sep 17 00:00:00 2001 From: Liam Date: Thu, 16 Mar 2023 11:56:51 -0400 Subject: build: only enable adrenotools on arm64 --- CMakeLists.txt | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'CMakeLists.txt') 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) -- cgit v1.2.3