aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2011-08-13 14:40:01 +0200
committerDaniel Stenberg <daniel@haxx.se>2011-08-13 14:42:21 +0200
commit40afeea2fbfd93b8189b9b1606735c3ea578753d (patch)
treee892ab8fc31bac40af6a2d050f7c3a28577a680d /CMakeLists.txt
parente40c663d36af128890f878bfce780a45bf2158a5 (diff)
cmake: find winsock when building on windows
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
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3a5bc4a0b..8ad8b4abe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -148,7 +148,9 @@ option(ENABLE_IPV6 "Define if you want to enable IPv6 support" OFF)
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})
@@ -861,4 +863,3 @@ install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/curl"
DESTINATION include
FILES_MATCHING PATTERN "*.h"
PATTERN "curlbuild.h" EXCLUDE)
- \ No newline at end of file