diff --git a/cmake/FindCppHttplib.cmake b/cmake/FindCppHttplib.cmake index a522c9fb..05464835 100644 --- a/cmake/FindCppHttplib.cmake +++ b/cmake/FindCppHttplib.cmake @@ -25,15 +25,13 @@ macro(find_system_httplib) endmacro() macro(include_bundled_httplib) - set(HTTPLIB_REQUIRE_OPENSSL "${OPENSSL_FOUND}") + if (NOT WIN32) + set(HTTPLIB_REQUIRE_OPENSSL ON) + endif() add_subdirectory(3rdparty/cpp-httplib EXCLUDE_FROM_ALL) endmacro() macro(find_cpp_httplib) - find_package(OpenSSL 3.0.0) - if (NOT OPENSSL_FOUND) - message(WARNING "Using cpp-httplib without OpenSSL support") - endif() if (TREMOTESF_WITH_HTTPLIB STREQUAL "auto") find_system_httplib() if (NOT httplib_FOUND) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ceba939c..bf0cd36d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -446,9 +446,6 @@ if (BUILD_TESTING) find_cpp_httplib() add_executable(requestrouter_test rpc/requestrouter_test.cpp) target_compile_definitions(requestrouter_test PRIVATE TEST_DATA_PATH="${CMAKE_CURRENT_SOURCE_DIR}/rpc/test-data") - if (OPENSSL_FOUND) - target_compile_definitions(requestrouter_test PRIVATE CPPHTTPLIB_OPENSSL_SUPPORT) - endif() add_test(NAME requestrouter_test COMMAND requestrouter_test) target_link_libraries(requestrouter_test PRIVATE tremotesf_objects Qt::Test) if (TARGET PkgConfig::httplib) diff --git a/vcpkg.json b/vcpkg.json index aa882f1e..61285a42 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -39,13 +39,18 @@ }, "qtsvg", "fmt", - { - "name": "openssl", - "platform": "!windows" - }, "kf6widgetsaddons", "cxxopts", - "cpp-httplib", + { + "name": "cpp-httplib", + "default-features": false, + "features": [ + { + "name": "openssl", + "platform": "!windows" + } + ] + }, { "name": "pkgconf", "platform": "windows",