[CMake] Programs linked to .a or .so libraries?

Philip Lowman philip at yhbt.com
Tue Aug 28 00:14:58 EDT 2007


-----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

- --
Philip Lowman
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG06FCe0tOktX6RKkRAoFBAJ0ZL4l5Yj+W8YhkFLZOFfdZtlwe/gCaA12F
5ScONFBL950UL0/GZu2ueO8=
=ZMNW
-----END PGP SIGNATURE-----


More information about the CMake mailing list