CMAKE_C_STANDARD_LIBRARIES holds a space-separated list of standard library which are automatic linked to every C target. Because the list holds only standard libraries there are all included in the default paths => no find_library is needed.
In curl version 7.22.0 paths to wsock32 and ws2_32 get found by find_library and are appended to space separated list CMAKE_C_STANDARD_LIBRARIES. Default installation of dotNet Framework SDK is something like "C:/Program Files/Microsoft SDKs" which contains spaces => the space separated list get "confused".
Solution: add only wsock32.lib ws2_32.lib to CMAKE_C_STANDARD_LIBRARIES as it was in curl-7_21_7
Curl version: 7.22.0
OS: Windows 64-bit
CMake version: 2.8.3
I read what you're saying, but I know nothing about cmake and you seem to contradict the bug/patch that was the reason for this change. See Bug 3389231 and commit 40afeea2fbfd93
I take it you then argue we should revert that patch and things are fine again?
Bug 3389231 seems to be related to mingw. I was testing with MSVC compiler.
In CMAKE_C_STANDARD_LIBRARIES all libraries are without path. For example kernel32.lib user32.lib gdi32.lib
So I suppose also wsock32.lib and ws2_32.lib should be without full path. In my build environment the LIB variable is set with the path to the standard library directory. (ex. C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib\X64)
Can you please show us a patch of what you suggest we do?
Thanks for reporting this issue and helping us improve curl and libcurl.
We're awaiting feedback in this issue. Due to this, I have set the state of this issue to pending and it will automatically get closed later on unless we get further info.
Please consider answering the outstanding questions or providing the missing info so that we can proceed to resolve this issue!