aboutsummaryrefslogtreecommitdiff
path: root/src/platform/windows
diff options
context:
space:
mode:
Diffstat (limited to 'src/platform/windows')
-rw-r--r--src/platform/windows/CMakeLists.txt58
1 files changed, 35 insertions, 23 deletions
diff --git a/src/platform/windows/CMakeLists.txt b/src/platform/windows/CMakeLists.txt
index d6607a64..174e77f8 100644
--- a/src/platform/windows/CMakeLists.txt
+++ b/src/platform/windows/CMakeLists.txt
@@ -12,26 +12,38 @@
# We cannot use nng_sources_if because these tests don't go into
# the static library unless they also go into the dynamic.
if (NNG_PLATFORM_WINDOWS)
-nng_sources(
- win_impl.h
- win_ipc.h
- win_tcp.h
- win_clock.c
- win_debug.c
- win_file.c
- win_io.c
- win_ipcconn.c
- win_ipcdial.c
- win_ipclisten.c
- win_pipe.c
- win_rand.c
- win_resolv.c
- win_sockaddr.c
- win_tcp.c
- win_tcpconn.c
- win_tcpdial.c
- win_tcplisten.c
- win_thread.c
- win_udp.c
- )
-endif() \ No newline at end of file
+ nng_check_sym(InitializeConditionVariable windows.h NNG_HAVE_CONDVAR)
+ nng_check_sym(snprintf stdio.h NNG_HAVE_SNPRINTF)
+ if (NOT NNG_HAVE_CONDVAR OR NOT NNG_HAVE_SNPRINTF)
+ message(FATAL_ERROR
+ "Modern Windows API support is missing. "
+ "Versions of Windows prior to Vista are not supported. "
+ "Further, the 32-bit MinGW environment is not supported. "
+ "Ensure you have at least Windows Vista or newer, and are "
+ "using either Visual Studio 2013 or newer or MinGW-W64.")
+ endif ()
+ nng_link_libraries(ws2_32 mswsock advapi32)
+
+ nng_sources(
+ win_impl.h
+ win_ipc.h
+ win_tcp.h
+ win_clock.c
+ win_debug.c
+ win_file.c
+ win_io.c
+ win_ipcconn.c
+ win_ipcdial.c
+ win_ipclisten.c
+ win_pipe.c
+ win_rand.c
+ win_resolv.c
+ win_sockaddr.c
+ win_tcp.c
+ win_tcpconn.c
+ win_tcpdial.c
+ win_tcplisten.c
+ win_thread.c
+ win_udp.c
+ )
+endif () \ No newline at end of file