[CMake] multiple cmake files in one directory

Clinton Stimpson clinton at elemtech.com
Wed Sep 23 12:34:30 EDT 2009


On Wednesday 23 September 2009 10:25:37 am th.tom at gmx.de wrote:
> hm, right - this would solve my problem, but sadly writing everything in
> one CMakeLists.txt file was not a clever idea, as the projects should be
> build independently.
>
> Another solution I had (someone posted that) is creating a subdirectory for
> every project and place the specific CMakeLists.txt file there. However,
> this would change the CMAKE_SOURCE_DIR to the projects subdirectory; what
> is kind of nasty.
>
> Any ideas to change the root back?

A subdirectory per project sounds good, but why is CMAKE_SOURCE_DIR a problem 
then?  Its just a variable pointing to some directory.

Clint


More information about the CMake mailing list