From ac5fd8852d2e54fe3d6b210261b0b10fc3b01d68 Mon Sep 17 00:00:00 2001 From: anonimal Date: Sat, 5 Nov 2016 05:19:17 +0000 Subject: [PATCH] Build: fix MinGW-w64 various undefined references Fixes #675 and #704. This patch may also help with #597 --- libs/network/src/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/network/src/CMakeLists.txt b/libs/network/src/CMakeLists.txt index ce559299c..6d5fbb0d6 100644 --- a/libs/network/src/CMakeLists.txt +++ b/libs/network/src/CMakeLists.txt @@ -46,6 +46,10 @@ target_link_libraries(cppnetlib-client-connections ${Boost_LIBRARIES} ${CMAKE_TH if (OPENSSL_FOUND) target_link_libraries(cppnetlib-client-connections ${OPENSSL_LIBRARIES}) endif () +if (MINGW) + target_link_libraries(cppnetlib-client-connections ws2_32) +endif () + install(TARGETS cppnetlib-client-connections EXPORT cppnetlibTargets PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR}