summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt6
-rw-r--r--config.h.cmake2
2 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a655c592..65a18ba0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -302,6 +302,12 @@ if(WIN32 OR WINCE)
set(ENABLE_NLS TRUE)
add_plugin(intl_cmake "windows detected" TRUE)
set(USE_LIBGNUINTL TRUE)
+
+ CHECK_LIBRARY_EXISTS(ws2_32 WSAStartup "" HAVE_WINSOCK)
+ if(HAVE_WINSOCK)
+ list(APPEND NAVIT_LIBS ws2_32)
+ endif(HAVE_WINSOCK)
+
endif()
if (WIN32)
set(HAVE_API_WIN32 1)
diff --git a/config.h.cmake b/config.h.cmake
index 4f86212e..e0d8811e 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -44,6 +44,8 @@
#cmakedefine HAVE_SOCKET 1
+#cmakedefine HAVE_WINSOCK 1
+
#ifdef _MSC_VER
#define __PRETTY_FUNCTION__ __FILE__":" << __LINE__
#endif