[CMake] Any suggestions for packaging a bizillion subprojects?

Christian Convey christian.convey at gmail.com
Fri Aug 10 11:00:35 EDT 2007


I've got a top-level directory with *70* subdirectories.  Each
subdirectory defines a sub-PROJECT (I'm not sure this was necessary),
and typically one build target (either a library or program).

I want to define two INSTALL components, which collectively will
install all 70 targets.  At my top-level source directory, I've
already defined two CMake variables, each of which lists the
subdirectories whose targets belong in the two different INSTALL
components.

Is there some kind of CMake code I can write, at the top-level
CMakeLists.txt file, that will add each of the 70 subdirectories'
build targets to the appropriate INSTALL component?

What I'm trying to avoid is having to go into all 70 of those
subdirectories and modifying each of those 70 CMakeLists.txt files,
adding an INSTALL command to each file.


More information about the CMake mailing list