From f7b30cdc2272dadcdd55e38b48eb61408cc8ddfa Mon Sep 17 00:00:00 2001 From: Torsten Dreyer Date: Mon, 2 May 2016 17:42:01 +0200 Subject: [PATCH] Try fix windows compile for udns --- 3rdparty/udns/CMakeLists.txt | 6 ++++++ 3rdparty/udns/config.h.in | 1 + 2 files changed, 7 insertions(+) diff --git a/3rdparty/udns/CMakeLists.txt b/3rdparty/udns/CMakeLists.txt index c3092297..e4ca6d2f 100644 --- a/3rdparty/udns/CMakeLists.txt +++ b/3rdparty/udns/CMakeLists.txt @@ -1,11 +1,17 @@ include (SimGearComponent) INCLUDE (CheckFunctionExists) INCLUDE (CheckSymbolExists) +include (CheckIncludeFile) + CHECK_FUNCTION_EXISTS(poll HAVE_POLL) CHECK_FUNCTION_EXISTS(getopt HAVE_GETOPT) CHECK_FUNCTION_EXISTS(inet_ntop HAVE_INET_PTON_NTOP) CHECK_SYMBOL_EXISTS(AF_INET6 "netinet/in.h" HAVE_IPv6) +# WINDOWS should be defined by msvc, should it? +# somehow it is not, if somebody know a better way to define WINDOWS, please fix +check_include_file(windows.h WINDOWS) + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_BINARY_DIR}/config.h) include_directories(${CMAKE_BINARY_DIR}) diff --git a/3rdparty/udns/config.h.in b/3rdparty/udns/config.h.in index d3068282..5968a3c5 100644 --- a/3rdparty/udns/config.h.in +++ b/3rdparty/udns/config.h.in @@ -2,3 +2,4 @@ #cmakedefine HAVE_GETOPT #cmakedefine HAVE_INET_PTON_NTOP #cmakedefine HAVE_IPv6 +#cmakedefine WINDOWS -- 2.39.5