diff --git a/CMakeLists.txt b/CMakeLists.txt index 2995bf63f..8fe336449 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,6 +70,9 @@ if(ENABLE_STATIC) else() set(LINPHONE_LIBS_FOR_TOOLS linphone) endif() +if(WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + list(APPEND LINPHONE_LIBS_FOR_TOOLS "Ws2_32") +endif() list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") diff --git a/coreapi/CMakeLists.txt b/coreapi/CMakeLists.txt index b87824989..c66c93e71 100644 --- a/coreapi/CMakeLists.txt +++ b/coreapi/CMakeLists.txt @@ -151,6 +151,9 @@ set(LIBS ${MEDIASTREAMER2_LIBRARIES} ${XML2_LIBRARIES} ) +if(WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "WinddowsStore") + list(APPEND LIBS "Ws2_32") +endif() if(ZLIB_FOUND) list(APPEND LIBS ${ZLIB_LIBRARIES}) endif()