[Cmake] separate compiling and linking

Iker Arizmendi iker at research.att.com
Fri, 23 Apr 2004 22:21:57 -0400


Given the following configuration:

LibTopDir
|
|--->CMakeLists.txt
|
|--->LibComponentOne
|    |--> CMakeLists.txt
|    |--> One.cpp, One.h, ...
|
|--->LibComponentTwo
|    |--> CMakeLists.txt
|    |--> Two.cpp, Two.h, ...


Is there a clean way to instruct CMake to _compile_
component objects in their respective directories
but to link them into a single library at the
LibTopDir level? I'm currently building a separate
library (with ADD_LIBRARY) for each "component" to
keep each one's source and build rules isolated from
the rest. But in the end all of these libraries are
used together by our client applications so it would
make sense to just produce a single library instead
of having client apps deal with the clutter.

Thanks,
Iker

-- 
Iker Arizmendi
AT&T Labs - Research
Speech and Image Processing Lab
e: iker at research.att.com
w: http://research.att.com