[CMake] Howto let FIND_LIBRARY prefer static over shared libraries

Marcel Loose loose at astron.nl
Fri Dec 10 06:36:47 EST 2010


Hi all,

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.

Best regards,
Marcel Loose.



More information about the CMake mailing list