On 11/17/2011 10:28 AM, Romain LEGUAY wrote: > Hello everyone! > I found in previous message there is none option to specify to > find_library function to search just static library. It was for CMake 2.6. > > Has it got any change with the new version of CMake?
AFAIK, it hasn't, since the root of this issue is still that there's no generally accepted naming convention for actual static libraries and the DLL-accompanying import libraries on Windows. However, on *nix, you might make FIND_LIBRARY() prefer static libaries by manipulating the CMAKE_FIND_LIBRARY_SUFFIXES variable. > I try to specify the name of the library like this: > > find_library(MY_STATIC_LIB NAMES libmylib.a PATHS /path/to/mylib) > > but it doesn't work. > > I don't understand the reason why it doesn't work. > > If anyone have some ideas... Usually, specifying the library's full name should work. Could you provide a minimal but complete counter-example for investigation? Regards, Michael -- 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