[CMake] find_library first searches for static libraries

Nicolas Desprès nicolas.despres at gmail.com
Tue Jul 1 14:37:38 EDT 2008


Hi list,

I'm looking for a way to say to find_library (cmake 2.6.0) that I
prefer static libraries rather than shared libraries. It seems that
there is no option to do. The only work around I found is the
following but it is not portable obviously.

set(CMAKE_FIND_LIBRARY_SUFFIXES ".a;.so")
find_library(OPENSSL_LIBRARY ssl)

If someone has a better solution, please fill free to tell me.

Thx in advance,

-- 
Nicolas Desprès


More information about the CMake mailing list