[CMake] Linking shared libraries into one single executable?

Alan W. Irwin irwin at beluga.phys.uvic.ca
Mon Aug 13 16:39:53 EDT 2007


On 2007-08-13 18:25+0200 Alexander Lex wrote:

> Hi,
>
> I'm not so savy with build systems and libraries etc, so please excuse if I'm 
> asking a couple of stupid questions:
>
> I have a project, managed by cmake, which uses a couple of external libraries 
> (Coin3D, SoQt, Qt4, ITK, SimVoleon, Boost).
>
> My project builds fine using the shared installed libraries.
>
> Now I'd like to put a releas on sourceforge, for both windows and linux, but 
> I can't expect people to have all those libraries installed. Most of them are 
> not managed by package management systems, and some are only available as 
> source files. I can not expect a potential user to compile those libraries - 
> so I need a way to include all the needed stuff in my program. I honestly 
> have no idea how to do that, so any pointers would be much appreciated!

If your users don't have the capability to build their own software, then
what you want is separate binary releases for the external software packages
that your package depends upon and a binary release of your own software as
well. I assume the major external packages you mentioned above already have
separate binary releases. For the minor ones that don't, then I suggest you
make a CMake build system for them and use the CPack component of CMake to
make binary releases.  (Donate that build system to the authors of the
external packages.  They should normally very much appreciate that.) Once
you have binary releases available for all external software packages, then
you can go ahead and configure your own package with CMake to find and use
those external packages and also (via CPack) make a binary release for your
own software as well.

Hope that overview helps.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list