[CMake] Finding WS2 library on Windows Vista

Hendrik Sattler post at hendrik-sattler.de
Fri Jul 2 14:59:03 EDT 2010


Am Freitag 02 Juli 2010, 19:56:02 schrieb Di Zou:
> I am trying to use CMake to find WS2_32.dll on Windows Vista. For me, the
> dll is located in C:/Program Files/Microsoft SDKs/Windows/v6.0A/Lib. So I
> use the command: FIND_LIBRARY(WS2 NAMES WS2_32 PATHS "C:/Program
> Files/Microsoft SDKs/Windows/*" "C:/Program Files/Microsoft
> SDKs/Windows/*/*") This command works on my computer, but I would like to
> make it more generic. I tried FIND_PACKAGE(WS2 REQUIRED) but that did not
> find anything. Is there a module available to find the WS2_32.dll? Also,
> is there a default or common location for WS2_32.dll?

ws2_32 (note: lower-case) is a system library. You do not need to use 
find_library for those.

HS


More information about the CMake mailing list