Skip to content

Commit

Permalink
COMP: Fix build against VTK > 9.1 explicitly including "vtkVersion.h"
Browse files Browse the repository at this point in the history
Following Kitware/VTK@d933bb849 (vtkDeprecation: remove symbols deprecated
in 9.1), the "vtkDeprecation.h" header (itself including "vtkVersionMacros.h"
was removed from "vtkOpenGLRenderWindow.h". This commit fixes the related
build errors by explicitly including "vtkVersion.h" and ensure that
the macro like VTK_MAJOR_VERSION and VTK_MINOR_VERSION are defined.
  • Loading branch information
jcfr committed Oct 7, 2022
1 parent 2e1c014 commit 25ffa49
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions Libs/Visualization/VTK/Widgets/ctkVTKAbstractView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <vtkRendererCollection.h>
#include <vtkRenderWindowInteractor.h>
#include <vtkTextProperty.h>
#include <vtkVersion.h>

//--------------------------------------------------------------------------
static ctkLogger logger("org.commontk.visualization.vtk.widgets.ctkVTKAbstractView");
Expand Down
1 change: 1 addition & 0 deletions Libs/Visualization/VTK/Widgets/ctkVTKChartView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include <vtkPlot.h>
#include <vtkRenderWindow.h>
#include <vtkRenderer.h>
#include <vtkVersion.h>

//----------------------------------------------------------------------------
static ctkLogger logger("org.commontk.visualization.vtk.widgets.ctkVTKChartView");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
#include <vtkRenderWindowInteractor.h>
#include <vtkScalarsToColors.h>
#include <vtkTable.h>
#include <vtkVersion.h>

//#define DEBUG_RANGE

Expand Down
1 change: 1 addition & 0 deletions Libs/Visualization/VTK/Widgets/ctkVTKMagnifyView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <vtkMath.h>
#include <vtkRenderWindow.h>
#include <vtkUnsignedCharArray.h>
#include <vtkVersion.h>

// STD includes
#include <cmath>
Expand Down

0 comments on commit 25ffa49

Please sign in to comment.