Commit 612bdc23 authored by Kyle Edwards's avatar Kyle Edwards

Move PDF export into a separate module from vtkIOExport

This allows the PDF functionality to be disabled on systems that
don't have our custom version of libharu with the HPDF_Shading
feature enabled.
parent 7f169569
......@@ -4,8 +4,6 @@ set(Module_SRCS
vtkIVExporter.cxx
vtkOBJExporter.cxx
vtkOOGLExporter.cxx
vtkPDFContextDevice2D.cxx
vtkPDFExporter.cxx
vtkPOVExporter.cxx
vtkRIBExporter.cxx
vtkRIBLight.cxx
......
......@@ -29,21 +29,13 @@ if(VTK_GHOSTSCRIPT_EXECUTABLE)
set(GL2PSTestsPDF
${GL2PSTestsPDFBothOpenGL}
)
# These only produce PDFs. They're separated since the above tests produce
# and verify both PDF and PS.
set(PDFTests
TestPDFContextExport.cxx,NO_DATA
TestPDFContextShading.cxx,NO_DATA
TestPDFExporterContextPolyData.cxx
)
endif()
vtk_add_test_cxx(vtkIOExportCxxTests tests
X3DTest.cxx,NO_DATA,NO_VALID
TestOBJExporter.cxx,NO_DATA,NO_VALID
TestSingleVTPExporter.cxx,NO_DATA,NO_VALID
${GL2PSTests} ${GL2PSTestsPDF} ${PDFTests} ${SVGTests}
${GL2PSTests} ${GL2PSTestsPDF} ${SVGTests}
TestRIBExporter.cxx,NO_VALID
UnitTestRIB.cxx,NO_DATA,NO_VALID
)
......@@ -102,7 +94,6 @@ endif()
set(TestGL2PSExporterVolumeRasterError 50)
include(vtkTestingGL2PS)
vtk_add_pdf_test_cxx(${PDFTests})
# text alignment and rotation with TextAsPath off is not
# yet implemented for the OpenGL2 backend.
vtk_add_gl2ps_test_cxx(${GL2PSTests})
......
......@@ -37,6 +37,5 @@ vtk_module(vtkIOExport
vtkFiltersGeometry
vtkIOImage
vtkImagingCore
vtklibharu
vtksys
)
include(vtkObjectFactory)
vtk_object_factory_configure("${vtk_module_overrides}")
set(Module_SRCS
vtkPDFContextDevice2D.cxx
vtkPDFExporter.cxx
${CMAKE_CURRENT_BINARY_DIR}/${vtk-module}ObjectFactory.cxx
)
vtk_module_library(${vtk-module} ${Module_SRCS})
if(VTK_GHOSTSCRIPT_EXECUTABLE)
set(PDFTests
TestPDFContextExport.cxx,NO_DATA
TestPDFContextShading.cxx,NO_DATA
TestPDFExporterContextPolyData.cxx
)
vtk_add_test_cxx(vtkIOExportPDFCxxTests tests
${PDFTests}
)
vtk_test_cxx_executable(vtkIOExportPDFCxxTests tests
RENDERING_FACTORY
)
include(vtkTestingGL2PS)
vtk_add_pdf_test_cxx(${PDFTests})
endif()
vtk_module(vtkIOExportPDF
GROUPS
Rendering
IMPLEMENTS
vtkIOExport
TEST_DEPENDS
vtkChartsCore
vtkTestingRendering
vtkRenderingContextOpenGL2
vtkViewsContext2D
DEPENDS
vtkIOExport
PRIVATE_DEPENDS
vtkCommonCore
vtkImagingCore
vtklibharu
)
......@@ -20,7 +20,7 @@
#ifndef vtkPDFContextDevice2D_h
#define vtkPDFContextDevice2D_h
#include "vtkIOExportModule.h" // For export macro
#include "vtkIOExportPDFModule.h" // For export macro
#include "vtkContextDevice2D.h"
#include "vtkNew.h" // For vtkNew!
......@@ -29,7 +29,7 @@ class vtkPath;
class vtkRenderer;
class vtkTransform;
class VTKIOEXPORT_EXPORT vtkPDFContextDevice2D: public vtkContextDevice2D
class VTKIOEXPORTPDF_EXPORT vtkPDFContextDevice2D: public vtkContextDevice2D
{
public:
static vtkPDFContextDevice2D* New();
......
......@@ -25,13 +25,13 @@
#ifndef vtkPDFExporter_h
#define vtkPDFExporter_h
#include "vtkIOExportModule.h" // For export macro
#include "vtkIOExportPDFModule.h" // For export macro
#include "vtkExporter.h"
class vtkContextActor;
class vtkRenderer;
class VTKIOEXPORT_EXPORT vtkPDFExporter: public vtkExporter
class VTKIOEXPORTPDF_EXPORT vtkPDFExporter: public vtkExporter
{
public:
static vtkPDFExporter* New();
......
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