When building on Windows, with CMake and mingw, curl fails to compile
because the CMake build system is not properly looking for the Winsock
libraries
Patch by: Pau Garcia i Quiles
Bug: http://curl.haxx.se/bug/view.cgi?id=3389231
mark_as_advanced(ENABLE_IPV6)
if(WIN32)
- list_spaces_append_once(CMAKE_C_STANDARD_LIBRARIES wsock32.lib ws2_32.lib) # bufferoverflowu.lib
+ find_library(WSOCK32_LIBRARY wsock32)
+ find_library(WS2_32_LIBRARY ws2_32)
+ list_spaces_append_once(CMAKE_C_STANDARD_LIBRARIES ${WSOCK32_LIBRARY} ${WS2_32_LIBRARY}) # bufferoverflowu.lib
if(CURL_DISABLE_LDAP)
# Remove wldap32.lib from space-separated list
string(REPLACE " " ";" _LIST ${CMAKE_C_STANDARD_LIBRARIES})
DESTINATION include
FILES_MATCHING PATTERN "*.h"
PATTERN "curlbuild.h" EXCLUDE)
-
\ No newline at end of file