> -----Original Message----- > From: Philip Lowman [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 28, 2007 12:15 AM > To: Convey Christian J NPRI > Cc: cmake@cmake.org > Subject: Re: [CMake] Programs linked to .a or .so libraries? > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Convey Christian J NPRI wrote: > > On Linux, I'm building a program that is linked against the > "ncurses" > > library. > > > > In CMake, what decides whether my program will be linked to > > libcurses.a or to libcurses.so ? > > > > I'd like to minimize external dependencies in the build program, so > > whenever possible I'd like to link to the .a version. But > if nothing > > else I need to know which version (static vs. dynamic) of a given > > library my program is linked to. > > This is another one of those things that has not been implemented in > CMake but which has been brought up before. > Implementing this on UNIX would be easy but I'm not sure on > Win32 since you couldn't simply rely on file extension to determine if > it's a static or shared library. > > http://www.cmake.org/Bug/view.php?id=1643 > > This workaround may help: > > http://www.cmake.org/pipermail/cmake/2006-September/011096.html
Thanks for the info. What a strange feature for CMake to lack! Does anyone know why this hasn't been implemented? That is, something like FIND_LIBRARY(... { STATIC_ONLY | SHARED_ONLY | PREFER_STATIC | PREFER_SHARED } ...) and/or ADD_LINK_LIBRARY(... { STATIC_ONLY | SHARED_ONLY | PREFER_STATIC | PREFER_SHARED } ...) ? Thanks, Christian
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake