From 083e18b11c24fff9e306801cd6f226eecbbb225c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Gallou=C3=ABt?= Date: Wed, 3 Dec 2025 14:47:02 +0100 Subject: [PATCH] cmake: explicitly link against crypt32 on non-MSVC Windows builds (#17727) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some toolchains do not support linking via pragmas such as: #pragma comment(lib, "crypt32.lib") so we need to add the library explicitly. Signed-off-by: Adrien Gallouët --- vendor/cpp-httplib/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vendor/cpp-httplib/CMakeLists.txt b/vendor/cpp-httplib/CMakeLists.txt index 8e1cd9a9da..369502d7ae 100644 --- a/vendor/cpp-httplib/CMakeLists.txt +++ b/vendor/cpp-httplib/CMakeLists.txt @@ -144,4 +144,7 @@ if (CPPHTTPLIB_OPENSSL_SUPPORT) find_library(SECURITY_FRAMEWORK Security REQUIRED) target_link_libraries(${TARGET} PUBLIC ${CORE_FOUNDATION_FRAMEWORK} ${SECURITY_FRAMEWORK}) endif() + if (WIN32 AND NOT MSVC) + target_link_libraries(${TARGET} PUBLIC crypt32) + endif() endif()