Browse Source

curl: Hard-code HAVE_W* macros on UNIX for Cygwin

The curl library code assumes that HAVE_WINDOWS_H and similar macros are
not defined on Cygwin.  Its CMake code achieved this by not even testing
for the corresponding headers on UNIX platforms.  However, libarchive
does test HAVE_WINDOWS_H and confuses our curl build.  We avoid the
conflict by hard-coding the macros to 0 for UNIX builds inside the curl
tree.
Brad King 16 years ago
parent
commit
997fd839ed
1 changed files with 6 additions and 0 deletions
  1. 6 0
      Utilities/cmcurl/CMakeLists.txt

+ 6 - 0
Utilities/cmcurl/CMakeLists.txt

@@ -246,6 +246,12 @@ MACRO(CHECK_INCLUDE_FILE_CONCAT FILE VARIABLE)
 ENDMACRO(CHECK_INCLUDE_FILE_CONCAT)
 
 # Check for header files
+IF(UNIX)
+  SET(HAVE_WINDOWS_H 0)
+  SET(HAVE_WINSOCK_H 0)
+  SET(HAVE_WS2TCPIP_H 0)
+  SET(HAVE_WINSOCK2_H 0)
+ENDIF(UNIX)
 IF(NOT UNIX)
   CHECK_INCLUDE_FILE_CONCAT("ws2tcpip.h"     HAVE_WS2TCPIP_H)
   CHECK_INCLUDE_FILE_CONCAT("winsock2.h"     HAVE_WINSOCK2_H)