diff options
| author | 2023-02-22 20:27:05 +0100 | |
|---|---|---|
| committer | 2023-02-28 06:39:54 +0100 | |
| commit | 0245c5dc4953b11397bd80a7bf658a736f1340e1 (patch) | |
| tree | 266b2fdff13b1b1e0dfb3faf1cb695ad0240194b | |
| parent | Merge pull request #9844 from abouvier/jwt-fix (diff) | |
| download | yuzu-0245c5dc4953b11397bd80a7bf658a736f1340e1.tar.gz yuzu-0245c5dc4953b11397bd80a7bf658a736f1340e1.tar.xz yuzu-0245c5dc4953b11397bd80a7bf658a736f1340e1.zip | |
externals: use openssl from vcpkg
Diffstat (limited to '')
| -rw-r--r-- | .gitmodules | 3 | ||||
| -rw-r--r-- | CMakeLists.txt | 6 | ||||
| -rw-r--r-- | externals/CMakeLists.txt | 35 | ||||
| m--------- | externals/libressl | 0 | ||||
| -rw-r--r-- | vcpkg.json | 11 |
5 files changed, 19 insertions, 36 deletions
diff --git a/.gitmodules b/.gitmodules index 8e98ee9cb..75c7b5fe0 100644 --- a/.gitmodules +++ b/.gitmodules | |||
| @@ -13,9 +13,6 @@ | |||
| 13 | [submodule "dynarmic"] | 13 | [submodule "dynarmic"] |
| 14 | path = externals/dynarmic | 14 | path = externals/dynarmic |
| 15 | url = https://github.com/MerryMage/dynarmic.git | 15 | url = https://github.com/MerryMage/dynarmic.git |
| 16 | [submodule "libressl"] | ||
| 17 | path = externals/libressl | ||
| 18 | url = https://github.com/citra-emu/ext-libressl-portable.git | ||
| 19 | [submodule "libusb"] | 16 | [submodule "libusb"] |
| 20 | path = externals/libusb/libusb | 17 | path = externals/libusb/libusb |
| 21 | url = https://github.com/libusb/libusb.git | 18 | url = https://github.com/libusb/libusb.git |
diff --git a/CMakeLists.txt b/CMakeLists.txt index 906073602..0f344ffd9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
| @@ -67,6 +67,9 @@ if (YUZU_USE_BUNDLED_VCPKG) | |||
| 67 | if (YUZU_CRASH_DUMPS) | 67 | if (YUZU_CRASH_DUMPS) |
| 68 | list(APPEND VCPKG_MANIFEST_FEATURES "dbghelp") | 68 | list(APPEND VCPKG_MANIFEST_FEATURES "dbghelp") |
| 69 | endif() | 69 | endif() |
| 70 | if (ENABLE_WEB_SERVICE) | ||
| 71 | list(APPEND VCPKG_MANIFEST_FEATURES "web-service") | ||
| 72 | endif() | ||
| 70 | 73 | ||
| 71 | include(${CMAKE_SOURCE_DIR}/externals/vcpkg/scripts/buildsystems/vcpkg.cmake) | 74 | include(${CMAKE_SOURCE_DIR}/externals/vcpkg/scripts/buildsystems/vcpkg.cmake) |
| 72 | elseif(NOT "$ENV{VCPKG_TOOLCHAIN_FILE}" STREQUAL "") | 75 | elseif(NOT "$ENV{VCPKG_TOOLCHAIN_FILE}" STREQUAL "") |
| @@ -244,9 +247,6 @@ endif() | |||
| 244 | if (ENABLE_WEB_SERVICE) | 247 | if (ENABLE_WEB_SERVICE) |
| 245 | find_package(cpp-jwt 1.4 CONFIG) | 248 | find_package(cpp-jwt 1.4 CONFIG) |
| 246 | find_package(httplib 0.12 MODULE) | 249 | find_package(httplib 0.12 MODULE) |
| 247 | if (NOT cpp-jwt_FOUND OR NOT httplib_FOUND) | ||
| 248 | find_package(OpenSSL 1.1 MODULE COMPONENTS Crypto SSL) | ||
| 249 | endif() | ||
| 250 | endif() | 250 | endif() |
| 251 | 251 | ||
| 252 | if (YUZU_TESTS) | 252 | if (YUZU_TESTS) |
diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index 966f5e94c..f2a560f04 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt | |||
| @@ -100,41 +100,18 @@ endif() | |||
| 100 | # Sirit | 100 | # Sirit |
| 101 | add_subdirectory(sirit EXCLUDE_FROM_ALL) | 101 | add_subdirectory(sirit EXCLUDE_FROM_ALL) |
| 102 | 102 | ||
| 103 | # LibreSSL | ||
| 104 | if (ENABLE_WEB_SERVICE AND DEFINED OPENSSL_FOUND) | ||
| 105 | if (WIN32 OR NOT OPENSSL_FOUND) | ||
| 106 | set(LIBRESSL_SKIP_INSTALL ON) | ||
| 107 | set(OPENSSLDIR "/etc/ssl/") | ||
| 108 | add_subdirectory(libressl EXCLUDE_FROM_ALL) | ||
| 109 | target_include_directories(ssl INTERFACE ./libressl/include) | ||
| 110 | target_compile_definitions(ssl PRIVATE -DHAVE_INET_NTOP) | ||
| 111 | get_directory_property(OPENSSL_LIBRARIES | ||
| 112 | DIRECTORY libressl | ||
| 113 | DEFINITION OPENSSL_LIBS) | ||
| 114 | else() | ||
| 115 | set(OPENSSL_LIBRARIES OpenSSL::SSL OpenSSL::Crypto) | ||
| 116 | endif() | ||
| 117 | endif() | ||
| 118 | |||
| 119 | # httplib | 103 | # httplib |
| 120 | if (ENABLE_WEB_SERVICE AND NOT TARGET httplib::httplib) | 104 | if (ENABLE_WEB_SERVICE AND NOT TARGET httplib::httplib) |
| 121 | add_library(httplib INTERFACE) | 105 | set(HTTPLIB_REQUIRE_OPENSSL ON) |
| 122 | target_include_directories(httplib INTERFACE ./cpp-httplib) | 106 | add_subdirectory(cpp-httplib EXCLUDE_FROM_ALL) |
| 123 | target_compile_definitions(httplib INTERFACE -DCPPHTTPLIB_OPENSSL_SUPPORT) | ||
| 124 | target_link_libraries(httplib INTERFACE ${OPENSSL_LIBRARIES}) | ||
| 125 | if (WIN32) | ||
| 126 | target_link_libraries(httplib INTERFACE crypt32 cryptui ws2_32) | ||
| 127 | endif() | ||
| 128 | add_library(httplib::httplib ALIAS httplib) | ||
| 129 | endif() | 107 | endif() |
| 130 | 108 | ||
| 131 | # cpp-jwt | 109 | # cpp-jwt |
| 132 | if (ENABLE_WEB_SERVICE AND NOT TARGET cpp-jwt::cpp-jwt) | 110 | if (ENABLE_WEB_SERVICE AND NOT TARGET cpp-jwt::cpp-jwt) |
| 133 | add_library(cpp-jwt INTERFACE) | 111 | set(CPP_JWT_BUILD_EXAMPLES OFF) |
| 134 | target_include_directories(cpp-jwt INTERFACE ./cpp-jwt/include) | 112 | set(CPP_JWT_BUILD_TESTS OFF) |
| 135 | target_compile_definitions(cpp-jwt INTERFACE CPP_JWT_USE_VENDORED_NLOHMANN_JSON) | 113 | set(CPP_JWT_USE_VENDORED_NLOHMANN_JSON OFF) |
| 136 | target_link_libraries(cpp-jwt INTERFACE ${OPENSSL_LIBRARIES}) | 114 | add_subdirectory(cpp-jwt EXCLUDE_FROM_ALL) |
| 137 | add_library(cpp-jwt::cpp-jwt ALIAS cpp-jwt) | ||
| 138 | endif() | 115 | endif() |
| 139 | 116 | ||
| 140 | # Opus | 117 | # Opus |
diff --git a/externals/libressl b/externals/libressl deleted file mode 160000 | |||
| Subproject 8929f818fd748fd31a34fec7c04558399e13014 | |||
diff --git a/vcpkg.json b/vcpkg.json index ef271f778..fbadca0e6 100644 --- a/vcpkg.json +++ b/vcpkg.json | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | { | 1 | { |
| 2 | "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json", | 2 | "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", |
| 3 | "name": "yuzu", | 3 | "name": "yuzu", |
| 4 | "builtin-baseline": "9b22b40c6c61bf0da2d46346dd44a11e90972cc9", | 4 | "builtin-baseline": "9b22b40c6c61bf0da2d46346dd44a11e90972cc9", |
| 5 | "version": "1.0", | 5 | "version": "1.0", |
| @@ -35,6 +35,15 @@ | |||
| 35 | "dbghelp": { | 35 | "dbghelp": { |
| 36 | "description": "Compile Windows crash dump (Minidump) support", | 36 | "description": "Compile Windows crash dump (Minidump) support", |
| 37 | "dependencies": [ "dbghelp" ] | 37 | "dependencies": [ "dbghelp" ] |
| 38 | }, | ||
| 39 | "web-service": { | ||
| 40 | "description": "Enable web services (telemetry, etc.)", | ||
| 41 | "dependencies": [ | ||
| 42 | { | ||
| 43 | "name": "openssl", | ||
| 44 | "platform": "windows" | ||
| 45 | } | ||
| 46 | ] | ||
| 38 | } | 47 | } |
| 39 | }, | 48 | }, |
| 40 | "overrides": [ | 49 | "overrides": [ |