Just give ADD_SUBDIRECTORY a second argument that tells it where to put the corresponding binary directory structure.<div><br></div><div>Something like:</div><div>ADD_SUBDIRECTORY(../blah "${CMAKE_CURRENT_BINARY_DIR}/blah")</div>
<div><br></div><div>(Assumes you do not also have an "ADD_SUBDIRECTORY(blah)" call and a "./blah" directory in addition to the "../blah" directory...)</div><div><br></div><div>"cmake --help-command ADD_SUBDIRECTORY" for more details.</div>
<div><br></div><div><br></div><div>HTH,</div><div>David</div><div><br><br><div class="gmail_quote">On Tue, Oct 28, 2008 at 2:01 AM, Jack Andrews <span dir="ltr"><<a href="mailto:effbiae@gmail.com">effbiae@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">i'm getting this error:<br>
<br>
>cmake -G "Visual Studio 8 2005"<br>
CMake Error: Error in cmake code at<br>
C:/cygwin/home/jack/play/d/CMakeLists.txt:1:<br>
ADD_SUBDIRECTORY not given a binary directory but the given source<br>
directory "C:/cygwin/home<br>
/jack/play/bdwgc" is not a subdirectory of<br>
"C:/cygwin/home/jack/play/d". When specifying an<br>
out-of-tree source a binary directory must be explicitly specified.<br>
Current CMake stack:<br>
[1] C:/cygwin/home/jack/play/d/CMakeLists.txt<br>
-- Configuring done<br>
<br>
<br>
the first line of my CMakeLists.txt is:<br>
ADD_SUBDIRECTORY(../bdwgc)<br>
<br>
<br>
is there a way to include the project defined in this sibling<br>
directory in the solution?<br>
<br>
<br>
ta, jack<br>
_______________________________________________<br>
CMake mailing list<br>
<a href="mailto:CMake@cmake.org">CMake@cmake.org</a><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>