[CMake] Static Modules

Ryan Pavlik rpavlik at iastate.edu
Wed Mar 10 17:19:56 EST 2010


On Wed, Mar 10, 2010 at 1:47 PM, Alexander Neundorf <a.neundorf-work at gmx.net
> wrote:

> On Tuesday 09 March 2010, Markus Raab wrote:
> > Hi list!
> >
> > I am currently trying to migrate a autotools project to cmake.
> >
> > The project used modules intensively. It was possible to compile all
> these
> > modules also statically and link them together to a single static
> library.
> > Is this supported out of the box by cmake? How?
>
> AFAIK no.
> In KDE we also had these libtool convenience libraries.
> We don't have that anymore, we just compile all the files directly into one
> library.
> We didn't have any issues with this since then.
>
> (it may be possible to hack something together with custom commands to
> extract
> the object files from the ar archives and put them together into a
> resulting
> ar file but I wouldn't recommend this)
>
> Alex
>

A bit less work: if you're building all the modules in CMake too, you could
loop through them extracting their source lists then adding those to a new
target: probably could be generalizable to a custom command in a cmake
module.

Ryan
-- 
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

rpavlik at iastate.edu
http://academic.cleardefinition.com
Internal VRAC/HCI Site: http://tinyurl.com/rpavlik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100310/7eb91092/attachment.htm>


More information about the CMake mailing list