diff options
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index af9f394f1..3b0891adf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
| @@ -49,7 +49,9 @@ option(YUZU_TESTS "Compile tests" "${BUILD_TESTING}") | |||
| 49 | 49 | ||
| 50 | option(YUZU_USE_PRECOMPILED_HEADERS "Use precompiled headers" ON) | 50 | option(YUZU_USE_PRECOMPILED_HEADERS "Use precompiled headers" ON) |
| 51 | 51 | ||
| 52 | cmake_dependent_option(YUZU_ROOM "Compile LDN room server" ON "NOT ANDROID" OFF) | 52 | option(YUZU_DOWNLOAD_ANDROID_VVL "Download validation layer binary for android" ON) |
| 53 | |||
| 54 | CMAKE_DEPENDENT_OPTION(YUZU_ROOM "Compile LDN room server" ON "NOT ANDROID" OFF) | ||
| 53 | 55 | ||
| 54 | CMAKE_DEPENDENT_OPTION(YUZU_CRASH_DUMPS "Compile Windows crash dump (Minidump) support" OFF "WIN32" OFF) | 56 | CMAKE_DEPENDENT_OPTION(YUZU_CRASH_DUMPS "Compile Windows crash dump (Minidump) support" OFF "WIN32" OFF) |
| 55 | 57 | ||
| @@ -61,8 +63,12 @@ option(YUZU_ENABLE_LTO "Enable link-time optimization" OFF) | |||
| 61 | 63 | ||
| 62 | option(YUZU_DOWNLOAD_TIME_ZONE_DATA "Always download time zone binaries" OFF) | 64 | option(YUZU_DOWNLOAD_TIME_ZONE_DATA "Always download time zone binaries" OFF) |
| 63 | 65 | ||
| 66 | option(YUZU_ENABLE_PORTABLE "Allow yuzu to enable portable mode if a user folder is found in the CWD" ON) | ||
| 67 | |||
| 64 | CMAKE_DEPENDENT_OPTION(YUZU_USE_FASTER_LD "Check if a faster linker is available" ON "NOT WIN32" OFF) | 68 | CMAKE_DEPENDENT_OPTION(YUZU_USE_FASTER_LD "Check if a faster linker is available" ON "NOT WIN32" OFF) |
| 65 | 69 | ||
| 70 | CMAKE_DEPENDENT_OPTION(USE_SYSTEM_MOLTENVK "Use the system MoltenVK lib (instead of the bundled one)" OFF "APPLE" OFF) | ||
| 71 | |||
| 66 | set(DEFAULT_ENABLE_OPENSSL ON) | 72 | set(DEFAULT_ENABLE_OPENSSL ON) |
| 67 | if (ANDROID OR WIN32 OR APPLE) | 73 | if (ANDROID OR WIN32 OR APPLE) |
| 68 | # - Windows defaults to the Schannel backend. | 74 | # - Windows defaults to the Schannel backend. |
| @@ -75,6 +81,24 @@ if (ANDROID OR WIN32 OR APPLE) | |||
| 75 | endif() | 81 | endif() |
| 76 | option(ENABLE_OPENSSL "Enable OpenSSL backend for ISslConnection" ${DEFAULT_ENABLE_OPENSSL}) | 82 | option(ENABLE_OPENSSL "Enable OpenSSL backend for ISslConnection" ${DEFAULT_ENABLE_OPENSSL}) |
| 77 | 83 | ||
| 84 | if (ANDROID AND YUZU_DOWNLOAD_ANDROID_VVL) | ||
| 85 | set(vvl_version "sdk-1.3.261.1") | ||
| 86 | set(vvl_zip_file "${CMAKE_BINARY_DIR}/externals/vvl-android.zip") | ||
| 87 | if (NOT EXISTS "${vvl_zip_file}") | ||
| 88 | # Download and extract validation layer release to externals directory | ||
| 89 | set(vvl_base_url "https://github.com/KhronosGroup/Vulkan-ValidationLayers/releases/download") | ||
| 90 | file(DOWNLOAD "${vvl_base_url}/${vvl_version}/android-binaries-${vvl_version}-android.zip" | ||
| 91 | "${vvl_zip_file}" SHOW_PROGRESS) | ||
| 92 | execute_process(COMMAND ${CMAKE_COMMAND} -E tar xf "${vvl_zip_file}" | ||
| 93 | WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/externals") | ||
| 94 | endif() | ||
| 95 | |||
| 96 | # Copy the arm64 binary to src/android/app/main/jniLibs | ||
| 97 | set(vvl_lib_path "${CMAKE_CURRENT_SOURCE_DIR}/src/android/app/src/main/jniLibs/arm64-v8a/") | ||
| 98 | file(COPY "${CMAKE_BINARY_DIR}/externals/android-binaries-${vvl_version}/arm64-v8a/libVkLayer_khronos_validation.so" | ||
| 99 | DESTINATION "${vvl_lib_path}") | ||
| 100 | endif() | ||
| 101 | |||
| 78 | # On Android, fetch and compile libcxx before doing anything else | 102 | # On Android, fetch and compile libcxx before doing anything else |
| 79 | if (ANDROID) | 103 | if (ANDROID) |
| 80 | set(CMAKE_SKIP_INSTALL_RULES ON) | 104 | set(CMAKE_SKIP_INSTALL_RULES ON) |
| @@ -522,7 +546,7 @@ if (ENABLE_SDL2) | |||
| 522 | if (YUZU_USE_BUNDLED_SDL2) | 546 | if (YUZU_USE_BUNDLED_SDL2) |
| 523 | # Detect toolchain and platform | 547 | # Detect toolchain and platform |
| 524 | if ((MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS 1940) AND ARCHITECTURE_x86_64) | 548 | if ((MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS 1940) AND ARCHITECTURE_x86_64) |
| 525 | set(SDL2_VER "SDL2-2.28.1") | 549 | set(SDL2_VER "SDL2-2.28.2") |
| 526 | else() | 550 | else() |
| 527 | message(FATAL_ERROR "No bundled SDL2 binaries for your toolchain. Disable YUZU_USE_BUNDLED_SDL2 and provide your own.") | 551 | message(FATAL_ERROR "No bundled SDL2 binaries for your toolchain. Disable YUZU_USE_BUNDLED_SDL2 and provide your own.") |
| 528 | endif() | 552 | endif() |