Hi Thomas, <br><br>Please consider the following use case and associated comments:<br><br>#--------------------<br># Build Log4Qt standalone<br>git clone git://<a href="http://github.com/commontk/Log4Qt.git">github.com/commontk/Log4Qt.git</a><br>

mkdir Log4Qt-build<br>cd  Log4Qt-build<br>cmake -DQT_QMAKE_EXECUTABLE:FILEPATH=/home/jchris/Projects/qtsdk-2010.05/qt/bin/qmake ../Log4Qt && make -j4<br>#--------------------<br><br>#--------------------<br># Checkout CTK source<br>

git clone git://<a href="http://github.com/commontk/CTK.git">github.com/commontk/CTK.git</a> CTK<br>#--------------------<br><br>#--------------------<br># Use case1: Build CTK with CTK_SUPERBUILD OFF specifying Log4Qt_DIR<br>

mkdir CTK-UseCase1-build<br>cmake -DQT_QMAKE_EXECUTABLE:FILEPATH=/home/jchris/Projects/qtsdk-2010.05/qt/bin/qmake -DCTK_SUPERBUILD:BOOL=OFF -DCTK_LIB_PluginFramework:BOOL=OFF -DLog4Qt_DIR:PATH=/home/jchris/Projects/sandbox/Log4Qt-build/ -DBUILD_TESTING:BOOL=OFF ../CTK<br>

<br>=> CMake Error at Libs/Core/CMakeLists.txt:6 (INCLUDE):<br>  include called with wrong number of arguments.  Include only takes one  file. <br>#--------------------<br><br><br>#--------------------<br># Use case2: Build CTK with CTK_SUPERBUILD ON specifying Log4Qt_DIR<br>

mkdir CTK-UseCase2-build<br>cmake -DQT_QMAKE_EXECUTABLE:FILEPATH=/home/jchris/Projects/qtsdk-2010.05/qt/bin/qmake -DCTK_LIB_PluginFramework:BOOL=OFF -DLog4Qt_DIR:PATH=/home/jchris/Projects/sandbox/Log4Qt-build/ -DBUILD_TESTING:BOOL=OFF ../CTK<br>

<br>=> It works<br>#--------------------<br><br>Obviously, UseCase1 couldn't be completed. It means, CTK can't be added as a regular project with CTK_SUPERBUILD:OFF<br>I could look at the issue next week ... before doing so. <br>

Seems we need to find way to generalize the code in Superbuild.cmake - line 135 to line 156<br>Sasha> Any suggestions ?<br><br>Waiting we find a solution, would it be possible for you to follow what's done in UseCase2 to have your project compiling and linking.<br>

<br>You could do something like:<br>Within the /path/to/ThirdParty/CMakeLists.txt<br><br>SET(CTK_LIB_PluginFramework OFF)<br>SET(CTK_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})<br>SET(CTK_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})<br>

SET(CTK_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY})<br>SET(LogQt_DIR "/path/to/Log4Qt-build")<br>add_subdirectory(CTK)<br>set(CTK_DIR ${CMAKE_CURRENT_BINARY_DIR}/CTK-build)<br>find_package(CTK)<br>

<br>Thanks<br>Jc<br><br><div class="gmail_quote">On Thu, Sep 29, 2011 at 12:25 PM, Thomas Wolf <span dir="ltr"><<a href="mailto:thomas.wolf@vision.ee.ethz.ch">thomas.wolf@vision.ee.ethz.ch</a>></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;">

Hello all,<br>
<br>
i have some problems with the non superbuild.<br>
I have a makefile similar along those lines:<br>
<br>
add_subdirectory(Log4Qt)<br>
add_subdirectory(GDCM)<br>
<br>
and finally<br>
add_subdirectory(CTK)<br>
<br>
Ibuild my externals directly in my makefile. External_project does not<br>
work here because another parent project cannot be allowed to be a<br>
external_project.<br>
<br>
Running through configuration step, i get the following:<br>
<br>
<---<br>
EXTERNAL_TARGETS:<br>
CMake Error at 3rdParty/CTK/CMake/ctkMacroValidateBuildOptions.cmake:202<br>
(MESSAGE):<br>
  CTKCore depends on unknown external targets: Log4Qt_LIBRARIES<br>
Call Stack (most recent call first):<br>
  3rdParty/CTK/CMakeLists.txt:512 (ctkMacroValidateBuildOptions)<br>
---><br>
<br>
similar also for GDCM.<br>
<br>
if i remove in the CTK main makefiles (ll. 507) the block with<br>
<br>
#-----------------------------------------------------------------------------<br>
# Let's make sure the enabled/disabled libraries, plugins or<br>
applications are coherent<br>
#<br>
ctkFunctionGenerateDGraphInput(${CTK_BINARY_DIR} "${target_directories}")<br>
ctkFunctionGenerateDGraphInput(${CTK_BINARY_DIR} "${target_directories}"<br>
WITH_EXTERNALS)<br>
ctkMacroValidateBuildOptions("${CTK_BINARY_DIR}" "${DGraph_EXECUTABLE}"<br>
"${target_directories}")<br>
<br>
it works somehow, at leats throug makefile generation.<br>
<br>
is the DGraph executable expecting a 'hard' target, as export?<br>
<br>
isn't the Log4Qt target already visible? There's no problem configuring<br>
and building it in the same makefile, just by disabling CTK..<br>
<br>
Regards,<br>
Thomas<br>
<br>
_______________________________________________<br>
Ctk-developers mailing list<br>
<a href="mailto:Ctk-developers@commontk.org">Ctk-developers@commontk.org</a><br>
<a href="http://public.kitware.com/cgi-bin/mailman/listinfo/ctk-developers" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/ctk-developers</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>+1 919 869 8849<br><br>