[CMake] How to build a library divided in many directories ?

packadal packadal at gmail.com
Mon Feb 25 05:49:36 EST 2008


Hi, I searched for an answer to this question in vain, so I'm asking here.

I am trying to build a library wich is spead among many subdirectories using
CMake, but I can't seem to do it "the Right Way".

Looks like the right way to do this would be to write a CMakeLists.txt in
each subdirectory, as this would be cleaner, and much more changes-friendly,
but I can't seem to build only one library when I do it this way.

example of my source tree :

+ src
|   - Application
|   - Attributes
|   - Audio
.
.
.
|   - Utils

Each directory containing multiple source files for the lib.
I managed to build the library, putting each and every file in a single
variable in one file, but this is looking quite ugly...

So how should i do please ?

Thanks in advance

P.S. : excuse the poor English, as i'ts not my mother tongue :)

-- 
- Always keep in mind that you may be wrong -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20080225/cfff221b/attachment.html


More information about the CMake mailing list