From: Adrien Gallouët Date: Tue, 17 Feb 2026 07:37:07 +0000 (+0100) Subject: build : link ws2_32 as PUBLIC on Windows (#19666) X-Git-Tag: gguf-v0.18.0~95 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=ae46a61e41be4e33ff7eabb36ddc4a7f43e1d0fb;p=pkg%2Fggml%2Fsources%2Fllama.cpp build : link ws2_32 as PUBLIC on Windows (#19666) Signed-off-by: Adrien Gallouët --- diff --git a/tools/server/CMakeLists.txt b/tools/server/CMakeLists.txt index 8c8ec1883..5621a51b2 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 a5887476a..f2d3f9800 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)