Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions src/Bridge/VtkGlue/VTKImageToITKImage/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@ project(VTKImageToITKImage)
find_package(ITK REQUIRED)
include(${ITK_USE_FILE})

find_package(VTK REQUIRED)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will change stand-alone build behavior of this and other similar examples. They used to work fine with VTK8- and throw a configure warning with VTK9+. Now they will work fine with VTK9+, but fail to work with VTK8-.

Copy link
Member

@dzenanz dzenanz Mar 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming that _vtk_prefix will be undefined (and therefore empty) if being built stand-alone.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you think this first find_package will change that? VTK is required anyway in these cases.

set(_vtk_prefix "")
if(VTK_VERSION VERSION_LESS "8.90.0")
set(_vtk_prefix "vtk")
endif()
find_package(VTK REQUIRED
COMPONENTS
vtkImagingColor
vtkIOImage
vtkRenderingCore
vtkRenderingGL2PSOpenGL2
${_vtk_prefix}ImagingColor
${_vtk_prefix}IOImage
${_vtk_prefix}RenderingCore
${_vtk_prefix}RenderingGL2PSOpenGL2
)
if(VTK_VERSION VERSION_LESS "8.90.0")
include(${VTK_USE_FILE})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@ project( VisualizeStaticDense2DLevelSetAsElevationMap )
find_package( ITK REQUIRED )
include( ${ITK_USE_FILE} )

find_package(VTK REQUIRED)
set(_vtk_prefix "")
if(VTK_VERSION VERSION_LESS "8.90.0")
set(_vtk_prefix "vtk")
endif()
find_package( VTK REQUIRED
COMPONENTS
vtkInteractionImage
vtkRenderingCore
vtkRenderingGL2PSOpenGL2
${_vtk_prefix}InteractionImage
${_vtk_prefix}RenderingCore
${_vtk_prefix}RenderingGL2PSOpenGL2
)
if( VTK_VERSION VERSION_LESS "8.90.0" )
include( ${VTK_USE_FILE} )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ project( VisualizeStaticDense2DLevelSetZeroSet )
find_package( ITK REQUIRED )
include( ${ITK_USE_FILE} )

find_package(VTK REQUIRED)
set(_vtk_prefix "")
if(VTK_VERSION VERSION_LESS "8.90.0")
set(_vtk_prefix "vtk")
endif()
find_package( VTK REQUIRED
COMPONENTS
vtkRenderingCore
vtkRenderingGL2PSOpenGL2
${_vtk_prefix}RenderingCore
${_vtk_prefix}RenderingGL2PSOpenGL2
)
if( VTK_VERSION VERSION_LESS "8.90.0" )
include( ${VTK_USE_FILE} )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ project( VisualizeStaticMalcolm2DLevelSetLayers )
find_package( ITK REQUIRED )
include( ${ITK_USE_FILE} )

find_package(VTK REQUIRED)
set(_vtk_prefix "")
if(VTK_VERSION VERSION_LESS "8.90.0")
set(_vtk_prefix "vtk")
endif()
find_package( VTK REQUIRED
COMPONENTS
vtkRenderingCore
vtkRenderingGL2PSOpenGL2
${_vtk_prefix}RenderingCore
${_vtk_prefix}RenderingGL2PSOpenGL2
)
if( VTK_VERSION VERSION_LESS "8.90.0" )
include( ${VTK_USE_FILE} )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ project( VisualizeStaticShi2DLevelSetLayers )
find_package( ITK REQUIRED )
include( ${ITK_USE_FILE} )

find_package(VTK REQUIRED)
set(_vtk_prefix "")
if(VTK_VERSION VERSION_LESS "8.90.0")
set(_vtk_prefix "vtk")
endif()
find_package( VTK REQUIRED
COMPONENTS
vtkRenderingCore
vtkRenderingGL2PSOpenGL2
${_vtk_prefix}RenderingCore
${_vtk_prefix}RenderingGL2PSOpenGL2
)
if( VTK_VERSION VERSION_LESS "8.90.0" )
include( ${VTK_USE_FILE} )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ project( VisualizeStaticWhitaker2DLevelSetLayers )
find_package( ITK REQUIRED )
include( ${ITK_USE_FILE} )

find_package(VTK REQUIRED)
set(_vtk_prefix "")
if(VTK_VERSION VERSION_LESS "8.90.0")
set(_vtk_prefix "vtk")
endif()
find_package( VTK REQUIRED
COMPONENTS
vtkRenderingCore
vtkRenderingGL2PSOpenGL2
${_vtk_prefix}RenderingCore
${_vtk_prefix}RenderingGL2PSOpenGL2
)
if( VTK_VERSION VERSION_LESS "8.90.0" )
include( ${VTK_USE_FILE} )
Expand Down
4 changes: 2 additions & 2 deletions src/Core/Common/DisplayImage/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ include(${ITK_USE_FILE})
if(ENABLE_QUICKVIEW)
find_package( VTK REQUIRED
COMPONENTS
vtkRenderingCore
vtkRenderingGL2PSOpenGL2
${_vtk_prefix}RenderingCore
${_vtk_prefix}RenderingGL2PSOpenGL2
)
if(VTK_VERSION VERSION_LESS "8.90.0")
include(${VTK_USE_FILE})
Expand Down
11 changes: 8 additions & 3 deletions src/Core/Common/FindMaxAndMinInImage/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@ project(FindMaxAndMinInImage)
find_package(ITK REQUIRED)
include(${ITK_USE_FILE})

find_package(VTK REQUIRED)
set(_vtk_prefix "")
if(VTK_VERSION VERSION_LESS "8.90.0")
set(_vtk_prefix "vtk")
endif()
find_package(VTK REQUIRED
COMPONENTS
vtkInteractionImage
vtkRenderingCore
vtkRenderingGL2PSOpenGL2
${_vtk_prefix}InteractionImage
${_vtk_prefix}RenderingCore
${_vtk_prefix}RenderingGL2PSOpenGL2
)
if(VTK_VERSION VERSION_LESS "8.90.0")
include(${VTK_USE_FILE})
Expand Down
11 changes: 8 additions & 3 deletions src/Core/Common/InPlaceFilterOfImage/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@ project(InPlaceFilterOfImage)
find_package(ITK REQUIRED)
include(${ITK_USE_FILE})

find_package(VTK REQUIRED)
set(_vtk_prefix "")
if(VTK_VERSION VERSION_LESS "8.90.0")
set(_vtk_prefix "vtk")
endif()
find_package(VTK REQUIRED
COMPONENTS
vtkInteractionImage
vtkRenderingCore
vtkRenderingGL2PSOpenGL2
${_vtk_prefix}InteractionImage
${_vtk_prefix}RenderingCore
${_vtk_prefix}RenderingGL2PSOpenGL2
)
if(VTK_VERSION VERSION_LESS "8.90.0")
include(${VTK_USE_FILE})
Expand Down
4 changes: 2 additions & 2 deletions src/Core/Common/IterateLineThroughImage/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ include(${ITK_USE_FILE})
if(ENABLE_QUICKVIEW)
find_package( VTK REQUIRED
COMPONENTS
vtkRenderingCore
vtkRenderingGL2PSOpenGL2
${_vtk_prefix}RenderingCore
${_vtk_prefix}RenderingGL2PSOpenGL2
)
if(VTK_VERSION VERSION_LESS "8.90.0")
include(${VTK_USE_FILE})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ include(${ITK_USE_FILE})
if(ENABLE_QUICKVIEW)
find_package(VTK REQUIRED
COMPONENTS
vtkRenderingCore
vtkRenderingGL2PSOpenGL2
${_vtk_prefix}RenderingCore
${_vtk_prefix}RenderingGL2PSOpenGL2
)

if(VTK_VERSION VERSION_LESS "8.90.0")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ include(${ITK_USE_FILE})
if(ENABLE_QUICKVIEW)
find_package(VTK REQUIRED
COMPONENTS
vtkRenderingCore
vtkRenderingGL2PSOpenGL2
${_vtk_prefix}RenderingCore
${_vtk_prefix}RenderingGL2PSOpenGL2
)
if(VTK_VERSION VERSION_LESS "8.90.0")
include(${VTK_USE_FILE})
Expand Down
11 changes: 8 additions & 3 deletions src/Core/Common/IterateRegionWithNeighborhood/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@ project(IterateRegionWithNeighborhood)
find_package(ITK REQUIRED)
include(${ITK_USE_FILE})

find_package(VTK REQUIRED)
set(_vtk_prefix "")
if(VTK_VERSION VERSION_LESS "8.90.0")
set(_vtk_prefix "vtk")
endif()
find_package(VTK REQUIRED
COMPONENTS
vtkInteractionImage
vtkRenderingCore
vtkRenderingGL2PSOpenGL2
${_vtk_prefix}InteractionImage
${_vtk_prefix}RenderingCore
${_vtk_prefix}RenderingGL2PSOpenGL2
)
if(VTK_VERSION VERSION_LESS "8.90.0")
include(${VTK_USE_FILE})
Expand Down
11 changes: 8 additions & 3 deletions src/Core/Common/IterateRegionWithWriteAccess/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@ project(IterateRegionWithWriteAccess)
find_package(ITK REQUIRED)
include(${ITK_USE_FILE})

find_package(VTK REQUIRED)
set(_vtk_prefix "")
if(VTK_VERSION VERSION_LESS "8.90.0")
set(_vtk_prefix "vtk")
endif()
find_package(VTK REQUIRED
COMPONENTS
vtkInteractionImage
vtkRenderingCore
vtkRenderingGL2PSOpenGL2
${_vtk_prefix}InteractionImage
${_vtk_prefix}RenderingCore
${_vtk_prefix}RenderingGL2PSOpenGL2
)

if(VTK_VERSION VERSION_LESS "8.90.0")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@ project(MakeOutOfBoundsPixelsReturnConstValue)
find_package(ITK REQUIRED)
include(${ITK_USE_FILE})

find_package(VTK REQUIRED)
set(_vtk_prefix "")
if(VTK_VERSION VERSION_LESS "8.90.0")
set(_vtk_prefix "vtk")
endif()
find_package(VTK REQUIRED
COMPONENTS
vtkInteractionImage
vtkInteractionStyle
vtkRenderingCore
vtkRenderingGL2PSOpenGL2
${_vtk_prefix}InteractionImage
${_vtk_prefix}InteractionStyle
${_vtk_prefix}RenderingCore
${_vtk_prefix}RenderingGL2PSOpenGL2
)

if(VTK_VERSION VERSION_LESS "8.90.0")
Expand Down
4 changes: 2 additions & 2 deletions src/Core/Common/MultiThreadOilPainting/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ include(${ITK_USE_FILE})
if(ENABLE_QUICKVIEW)
find_package(VTK REQUIRED
COMPONENTS
vtkRenderingCore
vtkRenderingGL2PSOpenGL2
${_vtk_prefix}RenderingCore
${_vtk_prefix}RenderingGL2PSOpenGL2
)
if(VTK_VERSION VERSION_LESS "8.90.0")
include(${VTK_USE_FILE})
Expand Down
11 changes: 8 additions & 3 deletions src/Core/Mesh/ConvertMeshToUnstructeredGrid/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@ project(ConvertMeshToUnstructeredGrid)
find_package(ITK REQUIRED)
include(${ITK_USE_FILE})

find_package(VTK REQUIRED)
set(_vtk_prefix "")
if(VTK_VERSION VERSION_LESS "8.90.0")
set(_vtk_prefix "vtk")
endif()
find_package(VTK REQUIRED
COMPONENTS
vtkIOXML
vtkCommonDataModel
vtkInteractionImage
${_vtk_prefix}IOXML
${_vtk_prefix}CommonDataModel
${_vtk_prefix}InteractionImage
)
if(VTK_VERSION VERSION_LESS "8.90.0")
include(${VTK_USE_FILE})
Expand Down
4 changes: 2 additions & 2 deletions src/Core/SpatialObjects/ContourSpatialObject/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ include(${ITK_USE_FILE})
if(ENABLE_QUICKVIEW)
find_package(VTK REQUIRED
COMPONENTS
vtkRenderingCore
vtkRenderingGL2PSOpenGL2
${_vtk_prefix}RenderingCore
${_vtk_prefix}RenderingGL2PSOpenGL2
)
if(VTK_VERSION VERSION_LESS "8.90.0")
include(${VTK_USE_FILE})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ include(${ITK_USE_FILE})
if(ENABLE_QUICKVIEW)
find_package(VTK REQUIRED
COMPONENTS
vtkRenderingCore
vtkRenderingGL2PSOpenGL2
${_vtk_prefix}RenderingCore
${_vtk_prefix}RenderingGL2PSOpenGL2
)
if(VTK_VERSION VERSION_LESS "8.90.0")
include(${VTK_USE_FILE})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ include(${ITK_USE_FILE})
if(ENABLE_QUICKVIEW)
find_package(VTK REQUIRED
COMPONENTS
vtkRenderingCore
vtkRenderingGL2PSOpenGL2
${_vtk_prefix}RenderingCore
${_vtk_prefix}RenderingGL2PSOpenGL2
)
if(VTK_VERSION VERSION_LESS "8.90.0")
include(${VTK_USE_FILE})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ include(${ITK_USE_FILE})
if(ENABLE_QUICKVIEW)
find_package(VTK REQUIRED
COMPONENTS
vtkRenderingCore
vtkRenderingGL2PSOpenGL2
${_vtk_prefix}RenderingCore
${_vtk_prefix}RenderingGL2PSOpenGL2
)
if(VTK_VERSION VERSION_LESS "8.90.0")
include(${VTK_USE_FILE})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ include(${ITK_USE_FILE})
if(ENABLE_QUICKVIEW)
find_package(VTK REQUIRED
COMPONENTS
vtkRenderingCore
vtkRenderingGL2PSOpenGL2
${_vtk_prefix}RenderingCore
${_vtk_prefix}RenderingGL2PSOpenGL2
)
if(VTK_VERSION VERSION_LESS "8.90.0")
include(${VTK_USE_FILE})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ include(${ITK_USE_FILE})
if(ENABLE_QUICKVIEW)
find_package(VTK REQUIRED
COMPONENTS
vtkRenderingCore
vtkRenderingGL2PSOpenGL2
${_vtk_prefix}RenderingCore
${_vtk_prefix}RenderingGL2PSOpenGL2
)
if(VTK_VERSION VERSION_LESS "8.90.0")
include(${VTK_USE_FILE})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ include(${ITK_USE_FILE})
if(ENABLE_QUICKVIEW)
find_package(VTK REQUIRED
COMPONENTS
vtkRenderingCore
vtkRenderingGL2PSOpenGL2
${_vtk_prefix}RenderingCore
${_vtk_prefix}RenderingGL2PSOpenGL2
)
if(VTK_VERSION VERSION_LESS "8.90.0")
include(${VTK_USE_FILE})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ include(${ITK_USE_FILE})
if(ENABLE_QUICKVIEW)
find_package(VTK REQUIRED
COMPONENTS
vtkRenderingCore
vtkRenderingGL2PSOpenGL2
${_vtk_prefix}RenderingCore
${_vtk_prefix}RenderingGL2PSOpenGL2
)

if(VTK_VERSION VERSION_LESS "8.90.0")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ include(${ITK_USE_FILE})
if(ENABLE_QUICKVIEW)
find_package(VTK REQUIRED
COMPONENTS
vtkRenderingCore
vtkRenderingGL2PSOpenGL2
${_vtk_prefix}RenderingCore
${_vtk_prefix}RenderingGL2PSOpenGL2
)
if(VTK_VERSION VERSION_LESS "8.90.0")
include(${VTK_USE_FILE})
Expand Down
Loading