[CMake] how to create library for a folder having only two sub folder

Philip Lowman philip at yhbt.com
Thu Jan 29 02:18:10 EST 2009


On Wed, Jan 28, 2009 at 11:49 PM, ankit jain <ankitguddu at gmail.com> wrote:

> Hi philip,
> Thanks for showing interest my query.
>
> Actually i have a folder name myapp. it has two sub folders sub1 and sub2
> only.
> these folders have some c files into it. i created the cmakelist file for
> both the subfolders and with add_library command i created the library for
> each of the sub folders. in the cmakelist file of myapp folder i add these
> two sub folders name using add_subdirectory.
>
> now i have two libraries created for each of the folders. What i want now
> is to create a library for the myapp folder which represent the entire
> folder.
>
> since we dont add the add_library command in the cmakelist of myapp folder
> i want to know how to create the library for the myapp folder.
>
> i hope it is clear to u now.
>
>

So you want

libA : A/foo.cc
libB : B/bar.cc

and a 3rd library:
libC : A/foo.cc B/bar.cc

?

Please always reply to list as others on-list can help with your query and
those off-list can learn from it via search engines.

-- 
Philip Lowman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090129/08e005a5/attachment.htm>


More information about the CMake mailing list