Skip to content

Commit

Permalink
WIP: vtkglue: fix compilation and object factories with 8.90
Browse files Browse the repository at this point in the history
  • Loading branch information
mathstuf committed May 16, 2019
1 parent 0d55292 commit 63e26fa
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
9 changes: 1 addition & 8 deletions Modules/Bridge/VtkGlue/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,7 @@ endif()

if(NOT COMMAND vtk_module_config)
macro(vtk_module_config ns)
foreach(arg ${ARGN})
if(${arg} MATCHES "^[Vv][Tt][Kk]")
string(REGEX REPLACE "^[Vv][Tt][Kk]" "" _arg ${arg})
else()
set(_arg ${arg})
endif()
set(${ns}_LIBRARIES ${${ns}_LIBRARIES} VTK::${_arg})
endforeach()
list(APPEND ${ns}_LIBRARIES ${ARGN})
endmacro()

if(NOT VTK_RENDERING_BACKEND)
Expand Down
5 changes: 0 additions & 5 deletions Modules/Bridge/VtkGlue/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ if(NOT VTK_RENDERING_BACKEND STREQUAL "None")
endif()

CreateTestDriver(ITKVtkGlue "${ITKVtkGlue-Test_LIBRARIES}" "${ITKVtkGlueTests}")
if(VTK_VERSION VERSION_GREATER_EQUAL "8.90.0")
vtk_module_autoinit(
TARGETS ITKVtkGlueTestDriver
MODULES ${VTK_LIBRARIES})
endif()

itk_add_test(
NAME itkImageToVTKImageFilterTest
Expand Down
6 changes: 6 additions & 0 deletions Modules/Segmentation/LevelSetsv4Visualization/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,10 @@ project(ITKLevelSetsv4Visualization)
# endif()
# ")

list(APPEND ITKLevelSetsv4Visualization_LIBRARIES

This comment has been minimized.

Copy link
@mathstuf

mathstuf May 16, 2019

Author Owner

The above commented block is still necessary. This is what it needs to end up with for 8.90. 8.2 probably needs _INCLUDE_DIRS extracted too.

VTK::ImagingCore
VTK::IOImage
VTK::RenderingAnnotation
VTK::RenderingCore)

itk_module_impl()
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ visualization of the level-sets.")
itk_module( ITKLevelSetsv4Visualization
DEPENDS
ITKLevelSetsv4
ITKVtkGlue
ITKVTK
ITKVtkGlue # Not necessary; `find_package(VTK)` needs done however

This comment has been minimized.

Copy link
@mathstuf

mathstuf May 16, 2019

Author Owner

This should be able to be removed once the big block comment goes away is restored properly.

TEST_DEPENDS
ITKVTK
ITKTestKernel
EXCLUDE_FROM_DEFAULT
DESCRIPTION
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,15 @@ itkVTKVisualize3DWhitakerLevelSetTest
itkVTKVisualize2DLevelSetAsElevationMapTest
)

set(ITKLevelSetsv4Visualization-Test_LIBRARIES ${ITKLevelSetsv4Visualization_LIBRARIES} )
list(APPEND ITKLevelSetsv4Visualization-Test_LIBRARIES ${ITKLevelSetsv4Visualization_LIBRARIES} )
CreateTestDriver(ITKLevelSetsv4Visualization "${ITKLevelSetsv4Visualization-Test_LIBRARIES}" "${ITKLevelSetsv4VisualizationTests}")
target_link_libraries(ITKLevelSetsv4VisualizationTestDriver
PRIVATE
VTK::InteractionStyle
VTK::RenderingOpenGL2)
vtk_module_autoinit(
TARGETS ITKLevelSetsv4VisualizationTestDriver
MODULES VTK::RenderingOpenGL2)

set(TEMP ${ITK_TEST_OUTPUT_DIR})

Expand Down

1 comment on commit 63e26fa

@mathstuf
Copy link
Owner Author

Choose a reason for hiding this comment

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

Please sign in to comment.