<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:14pt"><font size="3">Hi Luis,<br><br>Thanks, I've successfully compiled qt with cmake.<br>but when I use vtk ,&nbsp; errors that occured like this :<br></font><div><font size="3">&nbsp;</font></div><font size="2">make[2]: *** No rule to make target `/usr/lib/libtiff.so', needed by `qtvtk'.&nbsp; Stop.<br>make[2]: Leaving directory `/home/sutrisno/project-sut/qtvtkcmake'<br>make[1]: *** [CMakeFiles/qtvtk.dir/all] Error 2<br>make[1]: Leaving directory `/home/sutrisno/project-sut/qtvtkcmake'<br>make: *** [all] Error 2<br>root@sutrisno-pc:~/project-sut/qtvtkcmake</font><div style="font-family: arial,helvetica,sans-serif; font-size: 14pt;"><br><br><font size="3">Regards,<br><br>&nbsp;&nbsp; Sutrisno</font><br>&nbsp;&nbsp;&nbsp; <br><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><font size="2"
 face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">Dari:</span></b> Luis Ibanez &lt;luis.ibanez@kitware.com&gt;<br><b><span style="font-weight: bold;">Kepada:</span></b> SUTRISNO SUTRISNO &lt;sutrisno_link@yahoo.com&gt;<br><b><span style="font-weight: bold;">Cc:</span></b> itk &lt;Insight-users@itk.org&gt;<br><b><span style="font-weight: bold;">Terkirim:</span></b> Ming, 28 Maret, 2010 01:23:10<br><b><span style="font-weight: bold;">Judul:</span></b> How to use ITK+VTK+QT in an application<br></font><br>Hi Sutirsno,<br><br>Here is what you need in your CMakeLists.txt file<br>in order to use ITK+VTK+Qt:<br><br><br>FIND_PACKAGE(ITK&nbsp; REQUIRED)<br>INCLUDE(${ITK_USE_FILE})<br><br>FIND_PACKAGE(VTK REQUIRED)<br>INCLUDE(${VTK_USE_FILE})<br><br>FIND_PACKAGE( Qt4&nbsp;  REQUIRED )<br><br><br>INCLUDE_DIRECTORIES(<br>&nbsp; ${QT_INCLUDES}<br>&nbsp; ${VTK_INCLUDE_DIR}<br>&nbsp; ${QT_INCLUDE_DIR}<br>&nbsp; ${QT_QTGUI_INCLUDE_DIR}<br>&nbsp;
 ${QT_QTCORE_INCLUDE_DIR}<br>&nbsp; ${CMAKE_CURRENT_BINARY_DIR}<br>&nbsp; ${CMAKE_CURRENT_SOURCE_DIR}<br>&nbsp; )<br><br>LINK_LIBRARIES (<br>&nbsp; ITKIO ITKStatistics ITKNumerics<br>&nbsp; ${QT_QTCORE_LIBRARY}<br>&nbsp; ${QT_QTGUI_LIBRARY}<br>&nbsp; vtkCommon<br>&nbsp; vtkRendering<br>&nbsp; vtkIO<br>&nbsp; vtkFiltering<br>&nbsp; vtkGraphics<br>&nbsp; vtkWidgets<br>&nbsp; vtkImaging<br>&nbsp; )<br><br><br><br>Regards,<br><br><br>&nbsp; &nbsp; &nbsp; Luis<br><br><br><br><br>---------------------------------------------------------------------<br>On Thu, Mar 25, 2010 at 9:35 PM, SUTRISNO SUTRISNO<br>&lt;<a ymailto="mailto:sutrisno_link@yahoo.com" href="mailto:sutrisno_link@yahoo.com">sutrisno_link@yahoo.com</a>&gt; wrote:<br>&gt; Hi Luis,<br>&gt;<br>&gt; I've studied hard to configure my project with cmake<br>&gt; but I am still confused in writing CMakelists.txt<br>&gt; &nbsp;Can you help me how to write CMakeList.txt?<br>&gt;<br>&gt; I tried it in
 stages<br>&gt; 1. Just qt<br>&gt; 2. qt + vtk<br>&gt; 3. vtk and qt + ITK<br>&gt;<br>&gt; I failed for the first step (qt only). I made a simple program and I tried<br>&gt; configured with cmake<br>&gt; my project directory:<br>&gt; &nbsp;qtcmake /<br>&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- project.pro<br>&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- main.cpp<br>&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- form1.ui<br>&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- form1.ui.h<br>&gt;<br>&gt; my CMakeLists.txt :<br>&gt;<br>&gt; &nbsp; &nbsp; cmake_minimum_required(VERSION 2.6)<br>&gt; &nbsp; &nbsp; PROJECT(QtCmake)<br>&gt; &nbsp; &nbsp; INCLUDE
 (${CMAKE_ROOT}/Modules/FindQt.cmake)<br>&gt; &nbsp; &nbsp; FIND_PACKAGE(Qt3 REQUIRED)<br>&gt; &nbsp; &nbsp; INCLUDE_DIRECTORIES( ${QT_INCLUDE_DIR})<br>&gt; &nbsp; &nbsp; LINK_LIBRARIES( ${QT_QT_LIBRARY})<br>&gt; &nbsp; &nbsp; ADD_EXECUTABLE(QtCmake form1.ui.h form1.ui main.cpp&nbsp; )<br>&gt;<br>&gt; But there were error :<br>&gt;<br>&gt; root@sutrisno-pc:~/project-sut/qtcmake# cmake .<br>&gt; -- Configuring done<br>&gt; -- Generating done<br>&gt; -- Build files have been written to: /home/sutrisno/project-sut/qtcmake<br>&gt; root@sutrisno-pc:~/project-sut/qtcmake# make<br>&gt; Scanning dependencies of target QtCmake<br>&gt; [100%] Building CXX object CMakeFiles/QtCmake.dir/main.cpp.o<br>&gt; /home/sutrisno/project-sut/qtcmake/main.cpp:2:19: error: form1.h: No such<br>&gt; file or directory<br>&gt; /home/sutrisno/project-sut/qtcmake/main.cpp: In function ‘int main(int,<br>&gt; char**)’:<br>&gt; /home/sutrisno/project-sut/qtcmake/main.cpp:7: error:
 ‘Form1’ was not<br>&gt; declared in this scope<br>&gt; /home/sutrisno/project-sut/qtcmake/main.cpp:7: error: expected `;' before<br>&gt; ‘w’<br>&gt; /home/sutrisno/project-sut/qtcmake/main.cpp:8: error: ‘w’ was not declared<br>&gt; in this scope<br>&gt; make[2]: *** [CMakeFiles/QtCmake.dir/main.cpp.o] Error 1<br>&gt; make[1]: *** [CMakeFiles/QtCmake.dir/all] Error 2<br>&gt; make: *** [all] Error 2<br>&gt; root@sutrisno-pc:~/project-sut/qtcmake#<br>&gt;<br>&gt;<br>&gt; Regards,<br>&gt;<br>&gt; &nbsp;&nbsp; &nbsp;&nbsp; Sutrisno<br>&gt; ________________________________<br></div></div>
</div><br>
      <hr size=1> <a href="http://sg.rd.yahoo.com/id/mail/domainchoice/mail/signature/*http://mail.promotions.yahoo.com/newdomains/id/"> Dapatkan alamat Email baru Anda! </a> <br>
Dapatkan nama yang selalu Anda inginkan sebelum diambil orang lain!</body></html>