<DIV>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>Hey everybody,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> I'm a new VTK user, and I just need a few tips to get started. I mainly need help with the CMakeLists.txt file. I have an example VTK program called "Helix" that I am trying to run. I have installed VTK, and it contains the libraries that Helix needs to run, but when I try to build the Helix solution, there are errors saying that it cannot find vtkRenderWindowInteractor.h, vtkActor.h, etc. I can find these files on my own, and they are in directories like C:/VTK/Rendering/ However, this is in the original VTK directory, and not the VTK_Build directory. All of the right directories are in the CMakeLists.txt file in these lines:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>TARGET_LINK_LIBRARIES( helix<BR> ${QT_LIBRARIES}<BR> vtkRendering<BR> vtkFiltering<BR> vtkGraphics<BR> vtkIO<BR> vtkCommon</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>but there is something that isn't right. Either I didn't build VTK right, and the h-files didn't get into the build directory, or I need to know how to add lines into the CMakeLists.txt file to tell my Helix build where to go find the right files. Here is my entire CMakeLists.txt file in case it helps: (P.S.- I am working in WindowsXP.)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>PROJECT(helix)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>SET(VTK_DIR C:/VTK_ALL/VTK)<BR>INCLUDE_DIRECTORIES(${VTK_DIR}/include/vtk)<BR>LINK_DIRECTORIES(${VTK_DIR}/lib/vtk)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>#FIND_PACKAGE(VTK)<BR>#IF(NOT VTK_DIR)<BR># MESSAGE(FATAL_ERROR "Please set VTK_DIR.")<BR>#ENDIF(NOT VTK_DIR)<BR>#INCLUDE(${VTK_USE_FILE})</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2># use what QVTK built with<BR>SET(QT_MOC_EXECUTABLE ${VTK_QT_MOC_EXECUTABLE} CACHE FILEPATH "")<BR>SET(QT_UIC_EXECUTABLE ${VTK_QT_UIC_EXECUTABLE} CACHE FILEPATH "")<BR>SET(QT_QMAKE_EXECUTABLE ${VTK_QT_QMAKE_EXECUTABLE} CACHE FILEPATH "")<BR>SET(DESIRED_QT_VERSION ${VTK_DESIRED_QT_VERSION} CACHE STRING "")<BR>FIND_PACKAGE(Qt)<BR>IF(QT_USE_FILE)<BR> INCLUDE(${QT_USE_FILE})<BR>ELSE(QT_USE_FILE)<BR> SET(QT_LIBRARIES ${QT_QT_LIBRARY})<BR>ENDIF(QT_USE_FILE)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>SET (HelixSrcs<BR> main.cpp<BR> QVTKWidget.cxx<BR>)<BR>SET(UIS helix.ui)<BR>SET (HelixHeaders QVTKWidget.h)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2># Use the include path and library for Qt that is used by VTK.<BR>INCLUDE_DIRECTORIES(<BR> ${QT_INCLUDE_DIR}<BR> ${CMAKE_CURRENT_BINARY_DIR}<BR> ${CMAKE_CURRENT_SOURCE_DIR}<BR>)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>QT_WRAP_UI( helix UIHeaders UISrcs ${UIS})<BR>QT_WRAP_CPP( shelix MOCSrcs ${HelixHeaders} )<BR>SET_SOURCE_FILES_PROPERTIES(${HelixSrcs} PROPERTIES<BR> OBJECT_DEPENDS "${UIHeaders}")</FONT></DIV>
<DIV> </DIV><FONT face=Arial size=2>
<DIV><BR># It's nice to have the ui in the windows project file...just double click on it<BR># and designer comes up on that ui file :)<BR>IF (${CMAKE_BUILD_TOOL} MATCHES "msdev")<BR> SET (HelixSrcs ${HelixSrcs} ${UIS})<BR>ENDIF (${CMAKE_BUILD_TOOL} MATCHES "msdev")<BR>IF (${CMAKE_BUILD_TOOL} MATCHES "devenv")<BR> SET (SimpleViewSrcs ${SimpleViewSrcs} ${UIS})<BR>ENDIF (${CMAKE_BUILD_TOOL} MATCHES "devenv")</DIV>
<DIV> </DIV>
<DIV>#ADD_EXECUTABLE( helix WIN32 ${HelixSrcs} ${UISrcs} ${MOCSrcs})<BR>ADD_EXECUTABLE( helix ${HelixSrcs} ${UISrcs} ${MOCSrcs})</DIV>
<DIV> </DIV>
<DIV>TARGET_LINK_LIBRARIES( helix<BR> ${QT_LIBRARIES}<BR> vtkRendering<BR> vtkFiltering<BR> vtkGraphics<BR> vtkIO<BR> vtkCommon<BR>)</FONT></DIV></FONT></DIV></DIV>