[CMake] Common CMake setup for several projects

Paul Hansen paul.hansen.name at gmail.com
Fri Oct 14 07:33:12 EDT 2011


Hi

Is it possible to make a common CMake setup that can be used in several
projects?

The projects are independant but do use common libraries. Would be nice to
set this up in one place and not in the CMakeLists.txt for each project.

Can it be done "preprocessor-like":
#include "/path/to/common/CMakeLists.txt"

or is the way to make a top CMakeLists.txt that uses
add_subdirectory(project1)
add_subdirectory(project2)

or a third way?

Thank you very much
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20111014/161e20e2/attachment.htm>


More information about the CMake mailing list