Hi Thomas, <br><br>You will find below few points that should help you to address your issues:<br><br>1) CTK build system can be build with the option CTK_SUPERBUILD set to OFF, in that case the project will be built as a &quot;regular&quot; cmake project. <br>

<br>2) You could also build CTK normally (default option) providing VTK_DIR, Log4Qt_DIR etc ... the CTK 
build system will understand these dependencies are available and no 
project will be downloaded. This is somehow equivalent to build CTK with
 CTK_SUPERBUILB OFF<br><br>3) If you want to make sure all binaries and libs are built in a custom location, make sure you set:<br><pre><span class="s">CTK_CMAKE_</span><span class="s">ARCHIVE_OUTPUT_DIRECTORY<br></span><span class="s">CTK_CMAKE_</span><span class="s">LIBRARY_OUTPUT_DIRECTORY</span><span class="s"><br>

CTK_CMAKE_</span><span class="s">RUNTIME_OUTPUT_DIRECTORY<br><br>See <a href="https://github.com/commontk/CTK/blob/master/CMakeLists.txt#L91">https://github.com/commontk/CTK/blob/master/CMakeLists.txt#L91</a><br><br></span></pre>

Would be great if you could send request regarding CTK to <a href="mailto:ctk-developers@commontk.org">ctk-developers@commontk.org</a><br>More info here: <a href="http://www.commontk.org">http://www.commontk.org</a> and <a href="http://www.commontk.org/index.php/Getting_Started">http://www.commontk.org/index.php/Getting_Started</a><br>

<br>Thanks<br>Jc<br><br><div class="gmail_quote">On Wed, Sep 28, 2011 at 11:35 AM, Thomas Wolf <span dir="ltr">&lt;<a href="mailto:thomas.wolf@vision.ee.ethz.ch">thomas.wolf@vision.ee.ethz.ch</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

Hi there,<br>
<br>
I have some serious trouble to get a makefile running, comprising of MITK, VTK, ITK, CTK, Log4Qt, DCMTK, GDCM, etc...<br>
<br>
Because most of the makefiles have some imperfections regarding being built under windows and x64 with the project environment of Visual Studio 2008, we use direct builds in the main makefile. This also helps to see all source code of the involved projects. The project requirements are also set in a way that we cannto use git or downloads, so the technique called &quot;superbuild&quot; is not applicable here.<br>

</blockquote><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
To get the involved projects to be built at the correct place, namely all created binaries in the CMAKE_BINARY_DIR location of the main makefile, i try to override e.g. CTK_BINARY_DIR before the inclusion of the CTK makefile via add_subdirectory. <br>

</blockquote><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
I have a hard time doing this, even with<br>
<br>
SET(CTK_BINARY_DIR ${CMAKE_BINARY_DIR} CACHE INTERNAL &quot;&quot; FORCE PARENT_SCOPE)<br>
<br>
the next call to project(CTK) overrides this and takes some other value. This value corresponds to the layout of the source tree apparently, but is of no use in this situation.<br>
<br>
How can I influence the value of CTK_BINARY_DIR before the call to the makefile?<br>
<br>
i tried to use project(CTK) in the toplevel makefile one directory up, but even then the values won&#39;t be taken.<br>
<br>
so this situation in<br>
<br>
mainmakefile:<br>
<br>
project(CTK)<br>
set(CTK_BINARY_DIR &quot;some other place&quot; CACHE INTERNAL &quot;&quot; FORCE PARENT_SCOPE )<br>
add_subdirectory(CTK)<br>
<br>
does not change a thing for CTK. Even when the CTK makefile (naturally)<br>
sets project(CTK), cmake does not complain or state something about double projects, but silently overwrites the CTK_BINARY_DIR with new values! So it respects the second call to &#39;project()&#39;, which in my opinion should be either<br>


a) reported as an error<br>
or<br>
b) the first call to project(CTK) should have priority<br>
<br>
Can someone help me?<br>
<br>
Regards,<br>
Thomas<br>
--<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/<u></u>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/<u></u>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/<u></u>listinfo/cmake</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>+1 919 869 8849<br><br>