On 12. Feb, 2010, at 12:46 , burckha...@itis.ethz.ch wrote: > Hi, > > could you please tell me how I can force cmake to link all libraries > statically? > > Thank you very much, > > Kathrin
Just pass the full paths of the static libraries to TARGET_LINK_LIBRARIES. If you're using FIND_PACKAGE to find the libraries, you're currently out of luck, because there is no way to tell it that you only want the static libraries. Also, on Windows it is not easy to determine whether a .lib file really is a static library or just an import-library for a DLL. If you insist on -lname style linking, some compilers (e.g. GCC) on some systems take the -static option. But usually, this is more like a request, and e.g. on Mac OS X requires that ALL libraries must be static, which cannot be done since libSystem.dylib and crt0.o are not available in static form. HTH 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