From d1eddb7b4cd358e31fa92eeedd996f8d36628d0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Gallou=C3=ABt?= Date: Mon, 16 Feb 2026 12:39:36 +0000 Subject: [PATCH] build : link ws2_32 as PUBLIC on Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Adrien Gallouët --- tools/server/CMakeLists.txt | 4 ---- vendor/cpp-httplib/CMakeLists.txt | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/tools/server/CMakeLists.txt b/tools/server/CMakeLists.txt index 8c8ec18831..5621a51b22 100644 --- a/tools/server/CMakeLists.txt +++ b/tools/server/CMakeLists.txt @@ -59,8 +59,4 @@ target_include_directories(${TARGET} PRIVATE ../mtmd) target_include_directories(${TARGET} PRIVATE ${CMAKE_SOURCE_DIR}) target_link_libraries(${TARGET} PRIVATE server-context PUBLIC common cpp-httplib ${CMAKE_THREAD_LIBS_INIT}) -if (WIN32) - TARGET_LINK_LIBRARIES(${TARGET} PRIVATE ws2_32) -endif() - target_compile_features(${TARGET} PRIVATE cxx_std_17) diff --git a/vendor/cpp-httplib/CMakeLists.txt b/vendor/cpp-httplib/CMakeLists.txt index a5887476af..f2d3f98005 100644 --- a/vendor/cpp-httplib/CMakeLists.txt +++ b/vendor/cpp-httplib/CMakeLists.txt @@ -17,7 +17,7 @@ endif() target_link_libraries(${TARGET} PRIVATE Threads::Threads) if (WIN32 AND NOT MSVC) - target_link_libraries(${TARGET} PRIVATE ws2_32) + target_link_libraries(${TARGET} PUBLIC ws2_32) endif() target_compile_features(${TARGET} PRIVATE cxx_std_17)