On 12/10/2010 06:36 AM, Marcel Loose wrote:
> Is there a way to let FIND_LIBRARY prefer static over shared
> libraries?
> I know of one, but that's a bit hack-ish: 
> 
>   SET(CMAKE_FIND_LIBRARY_SUFFIXES .a)
> 
> Are there other options? 
> Ideally, I would like to be able to specify this per library search,
> i.e. as an option to FIND_LIBRARY.

Just ask for the archive name first:

  find_library(MYLIB NAMES libmylib.a mylib)

-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