diff options
Diffstat (limited to 'externals')
| -rw-r--r-- | externals/CMakeLists.txt | 42 | ||||
| -rw-r--r-- | externals/ffmpeg/CMakeLists.txt | 5 | ||||
| -rw-r--r-- | externals/glad/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | externals/libusb/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | externals/opus/CMakeLists.txt | 2 |
5 files changed, 29 insertions, 24 deletions
diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index e59eeb489..d78d10147 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt | |||
| @@ -8,15 +8,21 @@ set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) | |||
| 8 | # Disable tests in all externals supporting the standard option name | 8 | # Disable tests in all externals supporting the standard option name |
| 9 | set(BUILD_TESTING OFF) | 9 | set(BUILD_TESTING OFF) |
| 10 | 10 | ||
| 11 | # Build only static externals | ||
| 12 | set(BUILD_SHARED_LIBS OFF) | ||
| 13 | |||
| 14 | # Skip install rules for all externals | ||
| 15 | set_directory_properties(PROPERTIES EXCLUDE_FROM_ALL ON) | ||
| 16 | |||
| 11 | # xbyak | 17 | # xbyak |
| 12 | if ((ARCHITECTURE_x86 OR ARCHITECTURE_x86_64) AND NOT TARGET xbyak::xbyak) | 18 | if ((ARCHITECTURE_x86 OR ARCHITECTURE_x86_64) AND NOT TARGET xbyak::xbyak) |
| 13 | add_subdirectory(xbyak EXCLUDE_FROM_ALL) | 19 | add_subdirectory(xbyak) |
| 14 | endif() | 20 | endif() |
| 15 | 21 | ||
| 16 | # Dynarmic | 22 | # Dynarmic |
| 17 | if ((ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64) AND NOT TARGET dynarmic::dynarmic) | 23 | if ((ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64) AND NOT TARGET dynarmic::dynarmic) |
| 18 | set(DYNARMIC_IGNORE_ASSERTS ON) | 24 | set(DYNARMIC_IGNORE_ASSERTS ON) |
| 19 | add_subdirectory(dynarmic EXCLUDE_FROM_ALL) | 25 | add_subdirectory(dynarmic) |
| 20 | add_library(dynarmic::dynarmic ALIAS dynarmic) | 26 | add_library(dynarmic::dynarmic ALIAS dynarmic) |
| 21 | endif() | 27 | endif() |
| 22 | 28 | ||
| @@ -34,7 +40,7 @@ if (NOT TARGET inih::INIReader) | |||
| 34 | endif() | 40 | endif() |
| 35 | 41 | ||
| 36 | # mbedtls | 42 | # mbedtls |
| 37 | add_subdirectory(mbedtls EXCLUDE_FROM_ALL) | 43 | add_subdirectory(mbedtls) |
| 38 | target_include_directories(mbedtls PUBLIC ./mbedtls/include) | 44 | target_include_directories(mbedtls PUBLIC ./mbedtls/include) |
| 39 | 45 | ||
| 40 | # MicroProfile | 46 | # MicroProfile |
| @@ -48,7 +54,7 @@ endif() | |||
| 48 | 54 | ||
| 49 | # libusb | 55 | # libusb |
| 50 | if (ENABLE_LIBUSB AND NOT TARGET libusb::usb) | 56 | if (ENABLE_LIBUSB AND NOT TARGET libusb::usb) |
| 51 | add_subdirectory(libusb EXCLUDE_FROM_ALL) | 57 | add_subdirectory(libusb) |
| 52 | endif() | 58 | endif() |
| 53 | 59 | ||
| 54 | # SDL2 | 60 | # SDL2 |
| @@ -67,18 +73,16 @@ if (YUZU_USE_EXTERNAL_SDL2) | |||
| 67 | 73 | ||
| 68 | set(HIDAPI ON) | 74 | set(HIDAPI ON) |
| 69 | endif() | 75 | endif() |
| 70 | set(SDL_STATIC ON) | ||
| 71 | set(SDL_SHARED OFF) | ||
| 72 | if (APPLE) | 76 | if (APPLE) |
| 73 | set(SDL_FILE ON) | 77 | set(SDL_FILE ON) |
| 74 | endif() | 78 | endif() |
| 75 | 79 | ||
| 76 | add_subdirectory(SDL EXCLUDE_FROM_ALL) | 80 | add_subdirectory(SDL) |
| 77 | endif() | 81 | endif() |
| 78 | 82 | ||
| 79 | # ENet | 83 | # ENet |
| 80 | if (NOT TARGET enet::enet) | 84 | if (NOT TARGET enet::enet) |
| 81 | add_subdirectory(enet EXCLUDE_FROM_ALL) | 85 | add_subdirectory(enet) |
| 82 | target_include_directories(enet INTERFACE ./enet/include) | 86 | target_include_directories(enet INTERFACE ./enet/include) |
| 83 | add_library(enet::enet ALIAS enet) | 87 | add_library(enet::enet ALIAS enet) |
| 84 | endif() | 88 | endif() |
| @@ -86,24 +90,26 @@ endif() | |||
| 86 | # Cubeb | 90 | # Cubeb |
| 87 | if (ENABLE_CUBEB AND NOT TARGET cubeb::cubeb) | 91 | if (ENABLE_CUBEB AND NOT TARGET cubeb::cubeb) |
| 88 | set(BUILD_TESTS OFF) | 92 | set(BUILD_TESTS OFF) |
| 89 | add_subdirectory(cubeb EXCLUDE_FROM_ALL) | 93 | set(BUILD_TOOLS OFF) |
| 94 | add_subdirectory(cubeb) | ||
| 90 | add_library(cubeb::cubeb ALIAS cubeb) | 95 | add_library(cubeb::cubeb ALIAS cubeb) |
| 91 | endif() | 96 | endif() |
| 92 | 97 | ||
| 93 | # DiscordRPC | 98 | # DiscordRPC |
| 94 | if (USE_DISCORD_PRESENCE AND NOT TARGET DiscordRPC::discord-rpc) | 99 | if (USE_DISCORD_PRESENCE AND NOT TARGET DiscordRPC::discord-rpc) |
| 95 | add_subdirectory(discord-rpc EXCLUDE_FROM_ALL) | 100 | set(BUILD_EXAMPLES OFF) |
| 101 | add_subdirectory(discord-rpc) | ||
| 96 | target_include_directories(discord-rpc INTERFACE ./discord-rpc/include) | 102 | target_include_directories(discord-rpc INTERFACE ./discord-rpc/include) |
| 97 | add_library(DiscordRPC::discord-rpc ALIAS discord-rpc) | 103 | add_library(DiscordRPC::discord-rpc ALIAS discord-rpc) |
| 98 | endif() | 104 | endif() |
| 99 | 105 | ||
| 100 | # Sirit | 106 | # Sirit |
| 101 | add_subdirectory(sirit EXCLUDE_FROM_ALL) | 107 | add_subdirectory(sirit) |
| 102 | 108 | ||
| 103 | # httplib | 109 | # httplib |
| 104 | if (ENABLE_WEB_SERVICE AND NOT TARGET httplib::httplib) | 110 | if (ENABLE_WEB_SERVICE AND NOT TARGET httplib::httplib) |
| 105 | set(HTTPLIB_REQUIRE_OPENSSL ON) | 111 | set(HTTPLIB_REQUIRE_OPENSSL ON) |
| 106 | add_subdirectory(cpp-httplib EXCLUDE_FROM_ALL) | 112 | add_subdirectory(cpp-httplib) |
| 107 | endif() | 113 | endif() |
| 108 | 114 | ||
| 109 | # cpp-jwt | 115 | # cpp-jwt |
| @@ -111,12 +117,12 @@ if (ENABLE_WEB_SERVICE AND NOT TARGET cpp-jwt::cpp-jwt) | |||
| 111 | set(CPP_JWT_BUILD_EXAMPLES OFF) | 117 | set(CPP_JWT_BUILD_EXAMPLES OFF) |
| 112 | set(CPP_JWT_BUILD_TESTS OFF) | 118 | set(CPP_JWT_BUILD_TESTS OFF) |
| 113 | set(CPP_JWT_USE_VENDORED_NLOHMANN_JSON OFF) | 119 | set(CPP_JWT_USE_VENDORED_NLOHMANN_JSON OFF) |
| 114 | add_subdirectory(cpp-jwt EXCLUDE_FROM_ALL) | 120 | add_subdirectory(cpp-jwt) |
| 115 | endif() | 121 | endif() |
| 116 | 122 | ||
| 117 | # Opus | 123 | # Opus |
| 118 | if (NOT TARGET Opus::opus) | 124 | if (NOT TARGET Opus::opus) |
| 119 | add_subdirectory(opus EXCLUDE_FROM_ALL) | 125 | add_subdirectory(opus) |
| 120 | endif() | 126 | endif() |
| 121 | 127 | ||
| 122 | # FFMpeg | 128 | # FFMpeg |
| @@ -130,16 +136,14 @@ endif() | |||
| 130 | 136 | ||
| 131 | # Vulkan-Headers | 137 | # Vulkan-Headers |
| 132 | if (YUZU_USE_EXTERNAL_VULKAN_HEADERS) | 138 | if (YUZU_USE_EXTERNAL_VULKAN_HEADERS) |
| 133 | add_subdirectory(Vulkan-Headers EXCLUDE_FROM_ALL) | 139 | add_subdirectory(Vulkan-Headers) |
| 134 | endif() | 140 | endif() |
| 135 | 141 | ||
| 136 | if (NOT TARGET LLVM::Demangle) | 142 | if (NOT TARGET LLVM::Demangle) |
| 137 | add_library(demangle STATIC) | 143 | add_library(demangle demangle/ItaniumDemangle.cpp) |
| 138 | target_include_directories(demangle PUBLIC ./demangle) | 144 | target_include_directories(demangle PUBLIC ./demangle) |
| 139 | target_sources(demangle PRIVATE demangle/ItaniumDemangle.cpp) | ||
| 140 | add_library(LLVM::Demangle ALIAS demangle) | 145 | add_library(LLVM::Demangle ALIAS demangle) |
| 141 | endif() | 146 | endif() |
| 142 | 147 | ||
| 143 | add_library(stb STATIC) | 148 | add_library(stb stb/stb_dxt.cpp) |
| 144 | target_include_directories(stb PUBLIC ./stb) | 149 | target_include_directories(stb PUBLIC ./stb) |
| 145 | target_sources(stb PRIVATE stb/stb_dxt.cpp) | ||
diff --git a/externals/ffmpeg/CMakeLists.txt b/externals/ffmpeg/CMakeLists.txt index 0baac8e17..03fad0778 100644 --- a/externals/ffmpeg/CMakeLists.txt +++ b/externals/ffmpeg/CMakeLists.txt | |||
| @@ -131,7 +131,6 @@ if (NOT WIN32) | |||
| 131 | COMMAND | 131 | COMMAND |
| 132 | /bin/bash ${FFmpeg_PREFIX}/configure | 132 | /bin/bash ${FFmpeg_PREFIX}/configure |
| 133 | --disable-avdevice | 133 | --disable-avdevice |
| 134 | --disable-avfilter | ||
| 135 | --disable-avformat | 134 | --disable-avformat |
| 136 | --disable-doc | 135 | --disable-doc |
| 137 | --disable-everything | 136 | --disable-everything |
| @@ -143,6 +142,7 @@ if (NOT WIN32) | |||
| 143 | --enable-decoder=h264 | 142 | --enable-decoder=h264 |
| 144 | --enable-decoder=vp8 | 143 | --enable-decoder=vp8 |
| 145 | --enable-decoder=vp9 | 144 | --enable-decoder=vp9 |
| 145 | --enable-filter=yadif | ||
| 146 | --cc="${FFmpeg_CC}" | 146 | --cc="${FFmpeg_CC}" |
| 147 | --cxx="${FFmpeg_CXX}" | 147 | --cxx="${FFmpeg_CXX}" |
| 148 | ${FFmpeg_HWACCEL_FLAGS} | 148 | ${FFmpeg_HWACCEL_FLAGS} |
| @@ -199,7 +199,7 @@ if (NOT WIN32) | |||
| 199 | endif() | 199 | endif() |
| 200 | else(WIN32) | 200 | else(WIN32) |
| 201 | # Use yuzu FFmpeg binaries | 201 | # Use yuzu FFmpeg binaries |
| 202 | set(FFmpeg_EXT_NAME "ffmpeg-4.4") | 202 | set(FFmpeg_EXT_NAME "ffmpeg-5.1.3") |
| 203 | set(FFmpeg_PATH "${CMAKE_BINARY_DIR}/externals/${FFmpeg_EXT_NAME}") | 203 | set(FFmpeg_PATH "${CMAKE_BINARY_DIR}/externals/${FFmpeg_EXT_NAME}") |
| 204 | download_bundled_external("ffmpeg/" ${FFmpeg_EXT_NAME} "") | 204 | download_bundled_external("ffmpeg/" ${FFmpeg_EXT_NAME} "") |
| 205 | set(FFmpeg_FOUND YES) | 205 | set(FFmpeg_FOUND YES) |
| @@ -210,6 +210,7 @@ else(WIN32) | |||
| 210 | set(FFmpeg_LIBRARIES | 210 | set(FFmpeg_LIBRARIES |
| 211 | ${FFmpeg_LIBRARY_DIR}/swscale.lib | 211 | ${FFmpeg_LIBRARY_DIR}/swscale.lib |
| 212 | ${FFmpeg_LIBRARY_DIR}/avcodec.lib | 212 | ${FFmpeg_LIBRARY_DIR}/avcodec.lib |
| 213 | ${FFmpeg_LIBRARY_DIR}/avfilter.lib | ||
| 213 | ${FFmpeg_LIBRARY_DIR}/avutil.lib | 214 | ${FFmpeg_LIBRARY_DIR}/avutil.lib |
| 214 | CACHE PATH "Paths to FFmpeg libraries" FORCE) | 215 | CACHE PATH "Paths to FFmpeg libraries" FORCE) |
| 215 | # exported variables | 216 | # exported variables |
diff --git a/externals/glad/CMakeLists.txt b/externals/glad/CMakeLists.txt index 3dfcac2fd..0c8e285a4 100644 --- a/externals/glad/CMakeLists.txt +++ b/externals/glad/CMakeLists.txt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | # SPDX-FileCopyrightText: 2015 Yuri Kunde Schlesner <yuriks@yuriks.net> | 1 | # SPDX-FileCopyrightText: 2015 Yuri Kunde Schlesner <yuriks@yuriks.net> |
| 2 | # SPDX-License-Identifier: GPL-2.0-or-later | 2 | # SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | 3 | ||
| 4 | add_library(glad STATIC | 4 | add_library(glad |
| 5 | src/glad.c | 5 | src/glad.c |
| 6 | include/KHR/khrplatform.h | 6 | include/KHR/khrplatform.h |
| 7 | include/glad/glad.h | 7 | include/glad/glad.h |
diff --git a/externals/libusb/CMakeLists.txt b/externals/libusb/CMakeLists.txt index 6317ea807..6757b59da 100644 --- a/externals/libusb/CMakeLists.txt +++ b/externals/libusb/CMakeLists.txt | |||
| @@ -122,7 +122,7 @@ else() # MINGW OR (${CMAKE_SYSTEM_NAME} MATCHES "Linux") | |||
| 122 | add_compile_options(/utf-8) | 122 | add_compile_options(/utf-8) |
| 123 | endif() | 123 | endif() |
| 124 | 124 | ||
| 125 | add_library(usb STATIC EXCLUDE_FROM_ALL | 125 | add_library(usb |
| 126 | libusb/libusb/core.c | 126 | libusb/libusb/core.c |
| 127 | libusb/libusb/core.c | 127 | libusb/libusb/core.c |
| 128 | libusb/libusb/descriptor.c | 128 | libusb/libusb/descriptor.c |
diff --git a/externals/opus/CMakeLists.txt b/externals/opus/CMakeLists.txt index 410ff7c08..d9a03423d 100644 --- a/externals/opus/CMakeLists.txt +++ b/externals/opus/CMakeLists.txt | |||
| @@ -23,7 +23,7 @@ else() | |||
| 23 | endif() | 23 | endif() |
| 24 | endif() | 24 | endif() |
| 25 | 25 | ||
| 26 | add_library(opus STATIC | 26 | add_library(opus |
| 27 | # CELT sources | 27 | # CELT sources |
| 28 | opus/celt/bands.c | 28 | opus/celt/bands.c |
| 29 | opus/celt/celt.c | 29 | opus/celt/celt.c |