How about:<div><br></div><div>if(building_project_1)</div><div> include(${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists-1.txt)<br>endif()</div><div><div><br></div><div>if(building_project_2)</div><div> include(${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists-2.txt)</div>
<div>endif()</div><div><br></div><div><br></div><div class="gmail_quote">On Tue, Sep 22, 2009 at 11:55 AM, <span dir="ltr"><<a href="mailto:th.tom@gmx.de">th.tom@gmx.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br>
<br>
I have seen a thread about this issue but there was not a real solution, so I try to ask that again: Is there a way to define a specific CMakeLists.txt-file with a cmake call.<br>
<br>
I have two projects, which have the same root directory (what is really nasty but I can't change it actually):<br>
<br>
-data<br>
- subdir1<br>
- subdir2<br>
- subdir3<br>
<br>
These two projects need some subdirectories, so the cmake files would look like this:<br>
<br>
CMakeLists-1.txt: (Project 1)<br>
[..]<br>
SUBDIRS(<br>
subdir1<br>
subdir3<br>
)<br>
[..]<br>
<br>
and<br>
<br>
CMakeLists-2.txt: (Project 2)<br>
[..]<br>
SUBDIRS(<br>
subdir2<br>
)<br>
[..]<br>
<br>
I want to build project 1 completly independent from project 2.<br>
<br>
Thanks in advance - tom<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br></div>