summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2012-03-04 23:43:29 +0100
committerDaniel Stenberg <daniel@haxx.se>2012-03-16 22:42:17 +0100
commitede9ad43fc014bec0c7bd79edad18668a03aea73 (patch)
treef22df91a0d8302680fb313c848009c7d50db7da0 /CMakeLists.txt
parent0c8e36c18afc18b2de4c345c70828cf545a8715b (diff)
downloadcurl-ede9ad43fc014bec0c7bd79edad18668a03aea73.tar.gz
cmake: list_spaces_append_once fails with spaces in filename
Windows standard libraries are located in C:/Program Files/Microsoft SDKs/[...]. They are already included in the default MSVC LIBPATH. Hence, find_library(WSOCK32_LIBRARY wsock32) and find_library(WS2_32_LIBRARY ws2_32) are not needed. They return the full path to the libraries including spaces. Of course, list_spaces_append_once will mangle the result and the build fails. Bug: http://curl.haxx.se/bug/view.cgi?id=3494968
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dabdbcaec..88dd1ee6c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -148,9 +148,9 @@ option(ENABLE_IPV6 "Define if you want to enable IPv6 support" OFF)
mark_as_advanced(ENABLE_IPV6)
if(WIN32)
- 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
+ # Windows standard libraries are located in C:/Program Files/Microsoft SDKs/[...]
+ # They are already included in the default MSVC LIBPATH => no find_library is needed!
+ list_spaces_append_once(CMAKE_C_STANDARD_LIBRARIES wsock32.lib ws2_32.lib) # bufferoverflowu.lib
if(CURL_DISABLE_LDAP)
# Remove wldap32.lib from space-separated list
string(REPLACE " " ";" _LIST ${CMAKE_C_STANDARD_LIBRARIES})