[CMake] Why does find_library prefer xxx.dll

Bill Hoffman bill.hoffman at kitware.com
Fri Dec 29 12:31:53 EST 2006


Werner Smekal wrote:
> Hi,
>
> I use find_library() to check if a library exists. If the libxxx.dll 
> and the libxxx.a files are in the same directory, find_library() 
> returns libxxx.dll - but I can't link against this library (windows 
> case).
>
> I could regex replace the dll with the the correct suffix, but is 
> there a way to tell find_library() to return the correct filename?
>
> Thanks,
> Werner
>
What compiler are you using?   With cygwin you can link to a .dll.   
With MS VS you can not link to a .a.

-Bill



More information about the CMake mailing list