diff options
author | Sergei Nikulov <sergey.nikulov@gmail.com> | 2014-12-24 00:05:57 +0300 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2015-02-19 20:11:04 +0100 |
commit | ec80b1f414ef65f8a336be2e3270dcc35593f1b4 (patch) | |
tree | 921d31bdc2b2c7fbdea4891c6ca19496f3015e74 /CMake | |
parent | 676ac46ff55cf58c3c3005d8ee2c80da3a99e6a0 (diff) | |
download | curl-ec80b1f414ef65f8a336be2e3270dcc35593f1b4.tar.gz |
CMake: fix winsock2 detection on windows
Set CMAKE_REQUIRED_DEFINITIONS to include definitions needed to get
the winsock2 API from windows.h. Simplify the order of checks to
avoid extra conditions.
Use check_include_file instead of check_include_file_concat to look
for OpenSSL headers. They do not need to participate in a sequence
of dependent system headers. Also they may cause winsock.h to be
included before ws2tcpip.h, causing the latter to not be detected
in the sequence.
Reviewed-by: Brad King <brad.king@kitware.com>
Diffstat (limited to 'CMake')
-rw-r--r-- | CMake/FindGSS.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/CMake/FindGSS.cmake b/CMake/FindGSS.cmake index 4986a8e09..dfaeaf307 100644 --- a/CMake/FindGSS.cmake +++ b/CMake/FindGSS.cmake @@ -155,7 +155,7 @@ message(STATUS "LDFLAGS: ${_GSS_LIB_FLAGS}") set(GSS_FLAVOUR "MIT") else() # prevent compiling the header - just check if we can include it - set(CMAKE_REQUIRED_DEFINITIONS "-D__ROKEN_H__") + set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D__ROKEN_H__") check_include_file( "roken.h" _GSS_HAVE_ROKEN_H) check_include_file( "heimdal/roken.h" _GSS_HAVE_HEIMDAL_ROKEN_H) |