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")