THRIFT-3437 Fixed MinGW-w64 build
Client: Build
Patch: Antonio Di Monaco
This closes #771
diff --git a/lib/cpp/CMakeLists.txt b/lib/cpp/CMakeLists.txt
index 9404112..33cefcb 100755
--- a/lib/cpp/CMakeLists.txt
+++ b/lib/cpp/CMakeLists.txt
@@ -169,7 +169,11 @@
include(ThriftMacros)
ADD_LIBRARY_THRIFT(thrift ${thriftcpp_SOURCES} ${thriftcpp_threads_SOURCES})
-TARGET_LINK_LIBRARIES_THRIFT(thrift ${SYSLIBS})
+if(WIN32)
+ TARGET_LINK_LIBRARIES_THRIFT(thrift ${SYSLIBS} ws2_32)
+else()
+ TARGET_LINK_LIBRARIES_THRIFT(thrift ${SYSLIBS})
+endif()
if(WITH_LIBEVENT)
find_package(Libevent REQUIRED) # Libevent comes with CMake support form upstream