summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-09-10 19:40:18 +0200
committerGitHub <noreply@github.com>2023-09-10 19:40:18 +0200
commitb011ce023decd6e8fdd4e6311f2fb5d39ee32e8e (patch)
tree0aa00226283cb4a22b8e8d6206993faf7d1e3398 /CMakeLists.txt
parentvk_buffer_cache: Respect max vertex bindings in BindVertexBuffers (#11471) (diff)
parentrenderer_vulkan: Remove debug report (diff)
downloadyuzu-b011ce023decd6e8fdd4e6311f2fb5d39ee32e8e.tar
yuzu-b011ce023decd6e8fdd4e6311f2fb5d39ee32e8e.tar.gz
yuzu-b011ce023decd6e8fdd4e6311f2fb5d39ee32e8e.tar.bz2
yuzu-b011ce023decd6e8fdd4e6311f2fb5d39ee32e8e.tar.lz
yuzu-b011ce023decd6e8fdd4e6311f2fb5d39ee32e8e.tar.xz
yuzu-b011ce023decd6e8fdd4e6311f2fb5d39ee32e8e.tar.zst
yuzu-b011ce023decd6e8fdd4e6311f2fb5d39ee32e8e.zip
Diffstat (limited to '')
-rw-r--r--CMakeLists.txt20
1 files changed, 20 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4039c680e..c6b158985 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -49,6 +49,8 @@ option(YUZU_TESTS "Compile tests" "${BUILD_TESTING}")
option(YUZU_USE_PRECOMPILED_HEADERS "Use precompiled headers" ON)
+option(YUZU_DOWNLOAD_ANDROID_VVL "Download validation layer binary for android" ON)
+
CMAKE_DEPENDENT_OPTION(YUZU_ROOM "Compile LDN room server" ON "NOT ANDROID" OFF)
CMAKE_DEPENDENT_OPTION(YUZU_CRASH_DUMPS "Compile Windows crash dump (Minidump) support" OFF "WIN32" OFF)
@@ -77,6 +79,24 @@ if (ANDROID OR WIN32 OR APPLE)
endif()
option(ENABLE_OPENSSL "Enable OpenSSL backend for ISslConnection" ${DEFAULT_ENABLE_OPENSSL})
+if (ANDROID AND YUZU_DOWNLOAD_ANDROID_VVL)
+ set(vvl_version "sdk-1.3.261.1")
+ set(vvl_zip_file "${CMAKE_BINARY_DIR}/externals/vvl-android.zip")
+ if (NOT EXISTS "${vvl_zip_file}")
+ # Download and extract validation layer release to externals directory
+ set(vvl_base_url "https://github.com/KhronosGroup/Vulkan-ValidationLayers/releases/download")
+ file(DOWNLOAD "${vvl_base_url}/${vvl_version}/android-binaries-${vvl_version}-android.zip"
+ "${vvl_zip_file}" SHOW_PROGRESS)
+ execute_process(COMMAND ${CMAKE_COMMAND} -E tar xf "${vvl_zip_file}"
+ WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/externals")
+ endif()
+
+ # Copy the arm64 binary to src/android/app/main/jniLibs
+ set(vvl_lib_path "${CMAKE_CURRENT_SOURCE_DIR}/src/android/app/src/main/jniLibs/arm64-v8a/")
+ file(COPY "${CMAKE_BINARY_DIR}/externals/android-binaries-${vvl_version}/arm64-v8a/libVkLayer_khronos_validation.so"
+ DESTINATION "${vvl_lib_path}")
+endif()
+
# On Android, fetch and compile libcxx before doing anything else
if (ANDROID)
set(CMAKE_SKIP_INSTALL_RULES ON)