From 7abb043db5f5dbeee8c96e1db7b6425cf87d3897 Mon Sep 17 00:00:00 2001 From: Nicolas Bats Date: Wed, 7 Feb 2024 11:48:00 +0100 Subject: [PATCH] Update CMakeLists.txt --- cmake/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index c2b14cc..f8399e0 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -254,9 +254,15 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") if (WITH_STATIC) target_link_libraries(${LIBRARY_STATIC} PRIVATE "wsock32" "ws2_32" "iphlpapi") endif() + if (WITH_EXAMPLES) target_link_libraries(${NONBLOCKING_SERVER_EXAMPLE} PRIVATE "wsock32") + endif() + if (WITH_TESTS) target_link_libraries(${TESTLO} PRIVATE "wsock32") + endif() + if (WITH_CPP_TESTS) target_link_libraries(${TESTTCP} PRIVATE "wsock32") + endif() set_target_properties(${LIBRARY_SHARED} PROPERTIES COMPILE_DEFINITIONS "LIBLO_DLL")