CMake: fix pkg-config behavior when building for Android

This commit is contained in:
liushuyu 2023-03-04 00:05:17 -07:00 committed by bunnei
parent 1d0329a065
commit 19eec22b38
2 changed files with 4 additions and 0 deletions

View file

@ -108,6 +108,9 @@ 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")
endif()

View file

@ -101,6 +101,7 @@ android {
arguments "-DENABLE_QT=0", // Don't use QT
"-DENABLE_SDL2=0", // Don't use SDL
"-DENABLE_WEB_SERVICE=0", // Don't use telemetry
"-DBUNDLE_SPEEX=ON",
"-DANDROID_ARM_NEON=true", // cryptopp requires Neon to work
"-DYUZU_USE_BUNDLED_VCPKG=ON",
"-DYUZU_USE_BUNDLED_FFMPEG=ON"