[CMake] putting object files in a seperate direcotry OR combining static libraries

Kiran Pradeep kiran.happy at gmail.com
Mon Dec 4 06:22:30 EST 2006


Hi All,

            I use cmake to in project with only 1 level of subdirectory. In
each of those subdirectories i have a CMakeLitst.txt which creates a static
library out of its source files and put them in a single common directory.
Finally the main CmakeLists.txt will use all those lindividual static
libraries  to create the application.  Now there  is a requirement like, i
want to combine all those individual static libraries to a single static or
shared library. I know i have to run "ar x library.a"  to get back the
object files from each of those individual static libraries and then combine
them back to a single  library.

         How can i do this in an efficient manner ? Is there any way by
which the cmake will initially put the object files to a single common
directory so that i can use them to create a single static library out of
them instead of combining each of my static libraries. Or could you suggest
anything better ?

Thanks in advance
Kiran
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20061204/51909c3f/attachment.html


More information about the CMake mailing list