Commit e8564443 authored by Chris Cantwell's avatar Chris Cantwell

Further fixes to get VTK6 working.

parent 3afbc5c3
......@@ -11,5 +11,10 @@ ADD_UTILITIES_EXECUTABLE(SplitModes util-extra SplitModes.cpp)
IF (NEKTAR_USE_VTK)
ADD_UTILITIES_EXECUTABLE(VtkToPng util-extra VtkToPng.cpp)
TARGET_LINK_LIBRARIES(VtkToPng vtkCommon vtksys vtkViews vtkWidgets vtkRendering vtkIO)
IF (VTK_MAJOR_VERSION LESS 6)
TARGET_LINK_LIBRARIES(VtkToPng vtkCommon vtksys vtkViews vtkWidgets
vtkRendering vtkIO)
ELSE ()
TARGET_LINK_LIBRARIES(VtkToPng ${VTK_LIBRARIES})
ENDIF ()
ENDIF (NEKTAR_USE_VTK)
......@@ -42,7 +42,6 @@
#include <vtkWindowToImageFilter.h>
#include <vtkPNGWriter.h>
#include <vtkGraphicsFactory.h>
#include <vtkImagingFactory.h>
#include <vtkXMLUnstructuredGridReader.h>
#include <vtkDataSetMapper.h>
#include <vtkLookupTable.h>
......@@ -69,10 +68,6 @@ int main(int argc, char * argv[])
graphics_factory->SetOffScreenOnlyMode( 1);
graphics_factory->SetUseMesaClasses( 1 );
vtkSmartPointer<vtkImagingFactory> imaging_factory =
vtkSmartPointer<vtkImagingFactory>::New();
imaging_factory->SetUseMesaClasses( 1 );
// Create a poly data reader and retrieve dataset from file
vtkXMLUnstructuredGridReader* reader = vtkXMLUnstructuredGridReader::New();
reader->SetFileName(vInput.c_str());
......@@ -100,7 +95,7 @@ int main(int argc, char * argv[])
// Create a mapper and actor
vtkSmartPointer<vtkDataSetMapper> mapper =
vtkSmartPointer<vtkDataSetMapper>::New();
#if VTK_MAJOR_REVISION <= 5
#if VTK_MAJOR_VERSION <= 5
mapper->SetInput(data);
#else
mapper->SetInputData(data);
......
......@@ -9,7 +9,13 @@ IF (NEKTAR_USE_VTK)
SET(VtkStripsToPolysSources VtkStripsToPolys.cpp)
ADD_UTILITIES_EXECUTABLE(VtkToFld util-extra ${VtkToFldSources})
ADD_UTILITIES_EXECUTABLE(VtkStripsToPolys util-extra ${VtkStripsToPolysSources})
TARGET_LINK_LIBRARIES(VtkToFld vtkCommon vtkIO vtkGraphics)
TARGET_LINK_LIBRARIES(VtkStripsToPolys vtkCommon vtkIO vtkGraphics)
IF (VTK_MAJOR_VERSION LESS 6)
TARGET_LINK_LIBRARIES(VtkToFld vtkCommon vtkIO vtkGraphics)
TARGET_LINK_LIBRARIES(VtkStripsToPolys vtkCommon vtkIO vtkGraphics)
ELSE ()
TARGET_LINK_LIBRARIES(VtkToFld vtkCommonCore vtkIOLegacy
vtkFiltersGeometry)
TARGET_LINK_LIBRARIES(VtkStripsToPolys vtkCommonCore vtkIOLegacy)
ENDIF ()
ENDIF (NEKTAR_USE_VTK)
......@@ -49,5 +49,9 @@ ENDIF (NEKTAR_USE_VTK)
ADD_UTILITIES_EXECUTABLE(MeshConvert util ${MeshConvertSources} ${MeshConvertHeaders})
IF (NEKTAR_USE_VTK)
TARGET_LINK_LIBRARIES(MeshConvert vtkCommon vtkIO vtkGraphics)
IF (VTK_MAJOR_VERSION LESS 6)
TARGET_LINK_LIBRARIES(MeshConvert vtkCommon vtkIO vtkGraphics)
ELSE ()
TARGET_LINK_LIBRARIES(MeshConvert vtkCommonCore vtkIOLegacy)
ENDIF ()
ENDIF (NEKTAR_USE_VTK)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment