From 2eaa2c65cbc2e532e2353e115bf5151a82704534 Mon Sep 17 00:00:00 2001 From: Gustavo Rocha Dias <91472747+gustrd@users.noreply.github.com> Date: Fri, 12 Dec 2025 08:02:28 -0300 Subject: [PATCH] cmake: link ws2_32 for MinGW/w64devkit builds in cpp-httplib (#17949) --- vendor/cpp-httplib/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vendor/cpp-httplib/CMakeLists.txt b/vendor/cpp-httplib/CMakeLists.txt index 369502d7ae..e90e8e2d1b 100644 --- a/vendor/cpp-httplib/CMakeLists.txt +++ b/vendor/cpp-httplib/CMakeLists.txt @@ -9,6 +9,10 @@ if (NOT MSVC) endif() target_link_libraries (${TARGET} PRIVATE Threads::Threads) + +if (WIN32 AND NOT MSVC) + target_link_libraries(${TARGET} PUBLIC ws2_32) +endif() target_compile_features(${TARGET} PRIVATE cxx_std_17) target_compile_definitions(${TARGET} PRIVATE