diff options
| author | Garrett D'Amore <garrett@damore.org> | 2020-11-13 22:31:18 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2020-11-14 21:31:43 -0800 |
| commit | eb328da56c3fc7167b536dcb206df0abb0f4a9b9 (patch) | |
| tree | c92e3dd3db6a0f1b0efc6a027e7e4db6442068f0 /src/platform/windows | |
| parent | 7c1ff5ed1e48af413494b9070cccf79f3858b749 (diff) | |
| download | nng-eb328da56c3fc7167b536dcb206df0abb0f4a9b9.tar.gz nng-eb328da56c3fc7167b536dcb206df0abb0f4a9b9.tar.bz2 nng-eb328da56c3fc7167b536dcb206df0abb0f4a9b9.zip | |
fixes #1087 CMakeLists structural improvements desired
This doesn't modularize all the tests yet, but it goes a long way
in the right direction.
Diffstat (limited to 'src/platform/windows')
| -rw-r--r-- | src/platform/windows/CMakeLists.txt | 58 |
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 |
