Skip to content

Commit

Permalink
BUG: Call import vtk before loading the rest of the module
Browse files Browse the repository at this point in the history
  • Loading branch information
thewtex committed Nov 13, 2017
1 parent ae00c6d commit a51f0c1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions wrapping/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ itk_wrap_module(ITKVtkGlue)

itk_auto_load_submodules()
endif()
# We need to ensure that the VTK libraries are loaded, which are used by this
# module, but with weak linking. Since VTK does not use lazy loading yet,
# just 'import vtk' should do the trick.
set(ITK_WRAP_PYTHON_LIBRARY_IMPORTS "import vtk\n${ITK_WRAP_PYTHON_LIBRARY_IMPORTS}")
itk_end_wrap_module()

if(ITK_WRAP_PYTHON AND PYTHON_VERSION_STRING VERSION_LESS 3.0)
Expand Down

0 comments on commit a51f0c1

Please sign in to comment.