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

Convey Christian J NPRI ConveyCJ at Npt.NUWC.Navy.Mil
Tue Aug 28 06:55:54 EDT 2007


> -----Original Message-----
> From: cmake-bounces+conveycj=npt.nuwc.navy.mil at cmake.org 
> [mailto:cmake-bounces+conveycj=npt.nuwc.navy.mil at cmake.org] 
> On Behalf Of Hendrik Sattler
> Sent: Tuesday, August 28, 2007 6:46 AM
> To: cmake at cmake.org
> Subject: Re: [CMake] Programs linked to .a or .so libraries?
> 
> Am Dienstag 28 August 2007 12:31 schrieb Convey Christian J NPRI:
> > Thanks for the info.  What a strange feature for CMake to 
> lack!  Does 
> > anyone know why this hasn't been implemented?
> 
> OTOH, did you ask yourself why you actually want static 
> linking? Sure, your program will run that way but only with 
> increased memory usage and load time. 
> It's not a good thing to do (that's what APIs and ABIs are for).
> If the linker on a system prefers dynamic linking, why do you 
> want to override it?
> 

I'm creating installation packages for the software, and we have several
goals:

1) We want to minimize the number of external dependencies required to use
the software, so that installing it requires a minimum of fuss.

2) I'm producing Debian packages for the software, so I need to know which
dynamic libraries my program will need when it is executed.  For example, if
my program has been linked to libFLTK.so, then my Debian package must state
a package-dependency on the libfltk1.1 package.  But if my program has been
linked to libFLTK.a, no such package dependency exists and therefore my own
Debian package shouldn't list libfltk1.1 as a dependency.  Because the
computer that's being used to create the Debian packages might have both
libFLTK.a and libFLTK.so installed on it, I need to control, or at least
know, which version of the FLTK library was linked to my program.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4964 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/cmake/attachments/20070828/3ee99425/smime.bin


More information about the CMake mailing list