<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#ffffff">
<small>Hello,<br>
<br>
I would like to set up a "superbuild" for my project.<br>
I would like it to be as clean/basic as possible.<br>
<br>
Let's say I want to build VTK as my "ExternalProject". How should
I proceed to link it to my current project.<br>
<br>
My current project requires VTK to be built.<br>
So FIND_PACKAGE cannot work. (vtk source code not there during the
configuration step)<br>
And I didn't get any success manually setting VTK_DIR,
VTK_INCLUDE_DIRS, etc. at the end of my </small><small>External-VTK.cmake
file. Is it the way to go?<br>
<br>
How should I proceed to do it?<br>
Is there any tutorial on the net? (I couldn't find any)<br>
I had a look at CTK's and Slicer's superbuilds but we would like
something more basic and straight forward. Is it possible?<br>
Is there a special option in CMake/ExternalProjects to be enabled
or anything we can do about it?<br>
<br>
A workaround was to build "myProject" as an ExternalProject linked
to the "VTK </small><small>ExternalProject"</small><small>, and
to turn off USE_SUPERBUILD but I don't really like this solution.<br>
<br>
Any help would be greatly appreciated,<br>
<br>
Thanks<br>
</small><small><br>
<b><u>CMAKELISTS.TXT</u><br>
PROJECT</b>( MYPROJECT )<br>
...<br>
<b>OPTION</b>( USE_SUPERBUILD "Use SuperBuild" ON )<br>
...<br>
<b>IF</b>( USE_SUPERBUILD )<br>
<b>INCLUDE</b>(
"${GOFIGURE2_SOURCE_DIR}/CMake/SuperBuild/External-VTK.cmake" )<br>
<b>ENDIF</b>( USE_SUPERBUILD )</small><br>
<small>...<br>
<b>FIND_PACKAGE</b>( VTK )</small>??? //NOT WORKING<br>
...<br>
<u><b><br>
<small>External-VTK.cmake</small></b></u><br>
<small><br>
set(proj VTK)<br>
...<br>
ExternalProject_Add(${proj}<br>
SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}<br>
BINARY_DIR ${proj}-build<br>
GIT_REPOSITORY "${git_protocol}://vtk.org/VTK.git"<br>
GIT_TAG "origin/release"<br>
CMAKE_GENERATOR ${gen}<br>
CMAKE_ARGS<br>
${ep_common_args}<br>
-DBUILD_EXAMPLES:BOOL=OFF<br>
-DBUILD_SHARED_LIBS:BOOL=ON<br>
-DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}<br>
-DCMAKE_C_FLAGS:STRING=${ep_common_c_flags}<br>
-DVTK_USE_PARALLEL:BOOL=ON<br>
-DVTK_DEBUG_LEAKS:BOOL=${USE_VTK_DEBUG_LEAKS}<br>
-DVTK_USE_RPATH:BOOL=ON<br>
-DVTK_INSTALL_LIB_DIR:PATH=${MyProject_INSTALL_LIB_DIR}<br>
${VTK_QT_ARGS}<br>
${VTK_MAC_ARGS}<br>
INSTALL_COMMAND ""<br>
DEPENDS<br>
${VTK_DEPENDENCIES}<br>
)<br>
...</small><br>
set(VTK_DIR ${CMAKE_BINARY_DIR}/${proj}-build)??? // NOT WORKING<br>
</body>
</html>