What error do you get if you run cmake without the # on those two lines?<div><br></div><div>(Copy and paste the output of running cmake please.)<br><br></div><div><br><div class="gmail_quote">On Wed, Feb 18, 2009 at 11:54 AM, Yixun Liu <span dir="ltr"><<a href="mailto:enjoywm@cs.wm.edu">enjoywm@cs.wm.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="Ih2E3d">David Cole wrote:<br>
> Change this:<br>
> #FIND_PACKAGE(VTK REQUIRED)<br>
> #INCLUDE(${VTK_USE_FILE})<br>
><br>
> to this:<br>
> FIND_PACKAGE(VTK REQUIRED)<br>
> INCLUDE(${VTK_USE_FILE})<br>
><br>
><br>
> (Remove the comment character # -- those lines are commented out...)<br>
><br>
><br>
> HTH,<br>
> David<br>
><br>
><br>
> On Wed, Feb 18, 2009 at 8:26 AM, Yixun Liu <<a href="mailto:enjoywm@cs.wm.edu">enjoywm@cs.wm.edu</a><br>
</div><div><div></div><div class="Wj3C7c">> <mailto:<a href="mailto:enjoywm@cs.wm.edu">enjoywm@cs.wm.edu</a>>> wrote:<br>
><br>
> Hi,<br>
> I developed an application, which has many CMakeList, based on<br>
> VTK. One of CMakelist files is like the<br>
> following,<br>
><br>
> #FIND_PACKAGE(VTK REQUIRED)<br>
> #INCLUDE(${VTK_USE_FILE})<br>
><br>
> ...<br>
><br>
> TARGET_LINK_LIBRARIES(TetrahedrisationNG<br>
> Basics<br>
> Graphics2DNG<br>
> Graphics3DNG<br>
> vtkIO<br>
> vtkCommon<br>
> )<br>
><br>
> The error is<br>
> /usr/lib64/gcc/x86_64-suse-linux/4.2.1/../../../../x86_64-suse-linux/bin/ld:<br>
> cannot find -lvtkIO<br>
><br>
> However, I can successfully make vtk example using the following<br>
> CMakeList.<br>
><br>
> PROJECT (BlockMatchingGPU)<br>
><br>
> FIND_PACKAGE(VTK REQUIRED)<br>
> IF(NOT VTK_USE_RENDERING)<br>
> MESSAGE(FATAL_ERROR "Example ${PROJECT_NAME} requires<br>
> VTK_USE_RENDERING.")<br>
> ENDIF(NOT VTK_USE_RENDERING)<br>
> INCLUDE(${VTK_USE_FILE})<br>
><br>
><br>
> FIND_PACKAGE (ITK)<br>
> IF (ITK_FOUND)<br>
> INCLUDE(${USE_ITK_FILE} )<br>
> ENDIF(ITK_FOUND)<br>
><br>
><br>
> ADD_EXECUTABLE(BlockMatchingGPU BlockMatchingGPU.cxx)<br>
><br>
><br>
> TARGET_LINK_LIBRARIES(BlockMatchingGPU ITKBasicFilters ITKCommon<br>
> ITKIO vtkRendering vtkGraphics vtkHybrid vtkImaging vtkIO<br>
> vtkFiltering vtkCommon)<br>
><br>
> The application has many CMakeList. I don't know whether I add<br>
> FIND_PACKAGE<br>
> into the correct CMakeList.<br>
><br>
> Thanks.<br>
><br>
> Yixun<br>
><br>
> _______________________________________________<br>
</div></div>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a> <<a href="http://www.kitware.com" target="_blank">http://www.kitware.com</a>><br>
<div class="Ih2E3d">><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the CMake FAQ at:<br>
> <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/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/listinfo/cmake</a><br>
><br>
><br>
<br>
</div>Sorry. It's a mistake. It doesn't work without "#".<br>
</blockquote></div><br></div>