diff --git a/CMakeLists.txt b/CMakeLists.txt index 490da4c7807..fc654747fca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -175,6 +175,9 @@ if(MSVC) # TODO(jtattermusch): needed to build boringssl with VS2017, revisit later set(_gRPC_C_CXX_FLAGS "${_gRPC_C_CXX_FLAGS} /wd4987 /wd4774 /wd4819 /wd4996 /wd4619") endif() +if (MINGW) + add_definitions(-D_WIN32_WINNT=0x600) +endif() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_gRPC_C_CXX_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_gRPC_C_CXX_FLAGS}") @@ -217,7 +220,7 @@ elseif(UNIX) set(_gRPC_ALLTARGETS_LIBRARIES ${CMAKE_DL_LIBS} rt m pthread) endif() -if(WIN32 AND MSVC) +if(WIN32) set(_gRPC_BASELIB_LIBRARIES wsock32 ws2_32 crypt32) endif()