Thanks Brad,

Didn't realize that.
Does that also mean that I could change the default search order by
using:

  find_library(MATH_LIB NAMES libm.a libm.so)


Best regards,
Marcel Loose.

On Mon, 2009-05-11 at 13:39 -0400, Brad King wrote:
> Bill Hoffman wrote:
> > Marcel Loose wrote:
> >> 2) How can I persuade find_library() to only search for static
> >> libraries?
> >>
> > You can't.
> 
> Yes, you can:
> 
>    find_library(MATH_LIB NAMES libm.a)
> 
> If you specify a valid library name then CMake will look for it directly
> instead of prepending 'lib' and appending library extensions.
> 
> The reason there is no generic "find a static library" option is because
> it is almost impossible to implement on windows where one cannot distinguish
> import libraries and static libraries by their name.
> 
> -Brad

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to