diff --git a/.gitmodules b/.gitmodules index 9cd5c3ffaa..f29b20ee41 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,12 +4,6 @@ [submodule "libusb"] path = externals/libusb/libusb url = https://github.com/libusb/libusb.git -[submodule "cpp-httplib"] - path = externals/cpp-httplib - url = https://github.com/yhirose/cpp-httplib.git -[submodule "cpp-jwt"] - path = externals/cpp-jwt - url = https://github.com/arun11299/cpp-jwt.git [submodule "VulkanMemoryAllocator"] path = externals/VulkanMemoryAllocator url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 83fccef970..263271470d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -439,14 +439,6 @@ if (USE_DISCORD_PRESENCE) find_package(DiscordRPC MODULE) endif() -if (ENABLE_WEB_SERVICE) - find_package(cpp-jwt 1.4 CONFIG) -endif() - -if (ENABLE_WEB_SERVICE OR ENABLE_QT_UPDATE_CHECKER) - find_package(httplib 0.12 MODULE COMPONENTS OpenSSL) -endif() - if (YUZU_TESTS) find_package(Catch2 3.0.1 REQUIRED) endif() diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index 60e4fb363e..1391e9dcd5 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt @@ -202,17 +202,36 @@ CPMAddPackage( ) # httplib -if ((ENABLE_WEB_SERVICE OR ENABLE_QT_UPDATE_CHECKER) AND NOT TARGET httplib::httplib) - set(HTTPLIB_REQUIRE_OPENSSL ON) - add_subdirectory(cpp-httplib) +if ((ENABLE_WEB_SERVICE OR ENABLE_QT_UPDATE_CHECKER)) + set(CPM_USE_LOCAL_PACKAGES ON) + + # TODO(crueter): fix local package (gentoo?) + CPMAddPackage( + NAME httplib + VERSION 0.12 + URL "https://github.com/yhirose/cpp-httplib/archive/a609330e4c.zip" + URL_HASH SHA512=dd3fd0572f8367d8549e1319fd98368b3e75801a293b0c3ac9b4adb806473a4506a484b3d389dc5bee5acc460cb90af7a20e5df705a1696b56496b30b9ce7ed2 + FIND_PACKAGE_ARGUMENTS "MODULE" + OPTIONS + "HTTPLIB_REQUIRE_OPENSSL ON" + ) endif() # cpp-jwt -if (ENABLE_WEB_SERVICE AND NOT TARGET cpp-jwt::cpp-jwt) - set(CPP_JWT_BUILD_EXAMPLES OFF) - set(CPP_JWT_BUILD_TESTS OFF) - set(CPP_JWT_USE_VENDORED_NLOHMANN_JSON OFF) - add_subdirectory(cpp-jwt) +if (ENABLE_WEB_SERVICE) + set(CPM_USE_LOCAL_PACKAGES ON) + + CPMAddPackage( + NAME cpp-jwt + VERSION 1.4 + URL "https://github.com/arun11299/cpp-jwt/archive/10ef5735d8.zip" + URL_HASH SHA512=ebba3d26b33a3b0aa909f475e099594560edbce10ecd03e76d7fea68549a28713ea606d363808f88a5495b62c54c3cdb7e47aee2d946eceabd36e310479dadb7 + FIND_PACKAGE_ARGUMENTS "CONFIG" + OPTIONS + "CPP_JWT_BUILD_EXAMPLES OFF" + "CPP_JWT_BUILD_TESTS OFF" + "CPP_JWT_USE_VENDORED_NLOHMANN_JSON OFF" + ) endif() # Opus diff --git a/externals/cpp-httplib b/externals/cpp-httplib deleted file mode 160000 index a609330e4c..0000000000 --- a/externals/cpp-httplib +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a609330e4c6374f741d3b369269f7848255e1954 diff --git a/externals/cpp-jwt b/externals/cpp-jwt deleted file mode 160000 index 10ef5735d8..0000000000 --- a/externals/cpp-jwt +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 10ef5735d842b31025f1257ae78899f50a40fb14 diff --git a/src/web_service/CMakeLists.txt b/src/web_service/CMakeLists.txt index 37f9297247..22c0ff5109 100644 --- a/src/web_service/CMakeLists.txt +++ b/src/web_service/CMakeLists.txt @@ -15,7 +15,7 @@ add_library(web_service STATIC ) create_target_directory_groups(web_service) -target_link_libraries(web_service PRIVATE common network nlohmann_json::nlohmann_json httplib::httplib cpp-jwt::cpp-jwt) +target_link_libraries(web_service PRIVATE common network nlohmann_json::nlohmann_json httplib::httplib cpp-jwt) if (YUZU_USE_PRECOMPILED_HEADERS) target_precompile_headers(web_service PRIVATE precompiled_headers.h)