[CMake] how to build library for this..

ankit jain ankitguddu at gmail.com
Thu Jan 29 23:38:47 EST 2009


2009/1/29 Pau Garcia i Quiles <pgquiles at elpauer.org>

>  On Thu, Jan 29, 2009 at 1:12 PM, ankit jain <ankitguddu at gmail.com> wrote:
> > hi all,
> >
> > Problem:
> >
> > libA : A/foo.cc
> > libB : B/bar.cc
> > and a 3rd library:
> > libC : A/foo.cc B/bar.cc
> > ?
> >
> > here i build the libraries for A and B but not able to build lib for C .
> > Guide me to do that. What should be the content of cmakelist file of C to
> > create lib C
> >
> > here A and B are sub folders of C
>
> Do you ean you are trying this but it's not working?
>
> ADD_LIBRARY (libA A/foo.cc )
> ADD_LIBRARY (libB B/bar.cc )
> ADD_LIBRARY (libC libA libB )
>
> That fails because CMake does not support convenience libraries:
>
> http://www.cmake.org/Wiki/CMake_FAQ#Does_CMake_support_.22convenience.22_libraries.3F
>
> You need to do this:
>
> ADD_LIBRARY (libA A/foo.cc )
> ADD_LIBRARY (libB B/bar.cc )
> ADD_LIBRARY (libC A/foo.cc B/bar.cc )
>
> I. e. list the source files for libC
>
> Is that what you want to do?
>

Dont you think so it will be too hectic if there are 10 folders inside
folder C and each folder has around 10 C files each. then listing all will
be really cumbersome.
What should be the alternative for it.

Ankit Jain

>
> --
> Pau Garcia i Quiles
> http://www.elpauer.org
> (Due to my workload, I may need 10 days to answer)
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090130/254499c8/attachment-0001.htm>


More information about the CMake mailing list