From 7d1dcb0dffce968770d715d371fc855f46909438 Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Mon, 29 Mar 2010 22:23:47 +0200 Subject: [PATCH] Fix file inclusion with VS2003 --- ConfigureChecks.cmake | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 07fb7bf7..066c9f45 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -1,4 +1,5 @@ include(CheckIncludeFile) +include(CheckIncludeFiles) include(CheckSymbolExists) include(CheckFunctionExists) include(CheckLibraryExists) @@ -25,11 +26,14 @@ check_include_file(argp.h HAVE_ARGP_H) check_include_file(pty.h HAVE_PTY_H) check_include_file(terminos.h HAVE_TERMIOS_H) if (WIN32) - check_include_file(wspiapi.h HAVE_WSPIAPI_H) + check_include_files("winsock2.h;ws2tcpip.h;wspiapi.h" HAVE_WSPIAPI_H) if (NOT HAVE_WSPIAPI_H) - message(STATUS "WARNING: Without wspiapi.h, this build will only work on Windows XP and newer versions") + message(STATUS "WARNING: Without wspiapi.h (or dependencies), this build will only work on Windows XP and newer versions") endif (NOT HAVE_WSPIAPI_H) - check_include_file(ws2tcpip.h HAVE_WS2TCPIP_H) + check_include_files("winsock2.h;ws2tcpip.h" HAVE_WS2TCPIP_H) + if (NOT HAVE_WS2TCPIP_H) + message(ERROR "WARNING: Does not have ws2tcpip.h or winsock2.h") + endif (NOT HAVE_WS2TCPIP_H) if (HAVE_WSPIAPI_H OR HAVE_WS2TCPIP_H) set(HAVE_GETADDRINFO TRUE) set(HAVE_GETHOSTBYNAME TRUE)