]> git.ipfire.org Git - thirdparty/curl.git/commit
CMake: fix winsock2 detection on windows
authorSergei Nikulov <sergey.nikulov@gmail.com>
Tue, 23 Dec 2014 21:05:57 +0000 (00:05 +0300)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 19 Feb 2015 19:11:04 +0000 (20:11 +0100)
commitec80b1f414ef65f8a336be2e3270dcc35593f1b4
tree921d31bdc2b2c7fbdea4891c6ca19496f3015e74
parent676ac46ff55cf58c3c3005d8ee2c80da3a99e6a0
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>
CMake/FindGSS.cmake
CMakeLists.txt