From eccf2e53bca8dde720bd10936ce69fa77bde8d7d Mon Sep 17 00:00:00 2001 From: Simon Giesecke Date: Thu, 24 May 2018 15:12:57 +0200 Subject: [PATCH] Problem: cygwin build defines ZMQ_HAVE_WINDOWS Solution: do not check for windows.h on cygwin --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 01936b89..99e75c3d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -227,7 +227,11 @@ include (CMakeDependentOption) include (CheckCXXSymbolExists) include (CheckSymbolExists) -check_include_files (windows.h ZMQ_HAVE_WINDOWS) +if (NOT CYGWIN) + # TODO cannot we simply do 'if (WIN32) set(ZMQ_HAVE_WINDOWS ON)' or similar? + check_include_files (windows.h ZMQ_HAVE_WINDOWS) +endif() + if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND CMAKE_SYSTEM_VERSION STREQUAL "10.0") SET(ZMQ_HAVE_WINDOWS_UWP ON) ADD_DEFINITIONS(-D_WIN32_WINNT=_WIN32_WINNT_WIN10)