From 79a8f905cb43fbc32325bed534c2eedcb77ea55b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grisez?= Date: Fri, 3 Mar 2017 10:39:59 +0100 Subject: [PATCH] Fix build on Windows --- CMakeLists.txt | 3 +++ coreapi/CMakeLists.txt | 3 +++ 2 files changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 271cde7b1..276f97aba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,6 +82,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 bb91498d2..6c3378778 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()