[vtkusers] VTKPolyData to 3D image
David Doria
daviddoria+vtk at gmail.com
Tue Apr 20 11:58:15 EDT 2010
On Tue, Apr 20, 2010 at 11:55 AM, David Welch
<dmwelch at engineering.uiowa.edu> wrote:
> This is my CMake file:
>
>
> PROJECT(SurfaceToImage) # Project name
> CMAKE_MINIMUM_REQUIRED( VERSION 2.6) # This is the minimum version of CMake
> #*******************************************************************************
> FIND_PACKAGE(VTK REQUIRED)
> IF (VTK_FOUND)
> INCLUDE(${VTK_USE_FILE})
> ELSE (VTK_FOUND)
> MESSAGE(ERROR "Cannot build without a VTK build tree or a VTK
> installation. Please set VTK_DIR.")
> ENDIF (VTK_FOUND)
> #*******************************************************************************
> SET( SurfaceToImage_SOURCE SurfaceToImage.cxx )
> ADD_LIBRARY(SurfaceToImageLib SHARED ${SurfaceToImage_SOURCE})
> SET_TARGET_PROPERTIES (SurfaceToImageLib PROPERTIES COMPILE_FLAGS
> "-Dmain=ModuleEntryPoint")
> TARGET_LINK_LIBRARIES (SurfaceToImageLib vtkIO vtkFiltering vtkCommon
> vtkImaging)
> ADD_EXECUTABLE( SurfaceToImage ${SurfaceToImage_SOURCE})
> TARGET_LINK_LIBRARIES (SurfaceToImage vtkIO vtkCommon vtkFiltering
> vtkImaging)
Yep, you need to add vtkHybrid to the list of libraries you are linking to.
Thanks,
David
More information about the vtkusers
mailing list