Skip to content

Commit bcce50b

Browse files
committed
cmake: Fix support for VTK_ENABLE_VTKPYTHON set to OFF
Remove dependency of "vtkpython_pyc" on "vtkpython" if corresponding target is not built.
1 parent fb181d5 commit bcce50b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Wrapping/Python/CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -419,9 +419,11 @@ if(PYTHON_EXECUTABLE)
419419
# this should also depend on the vtkpython executable.
420420
add_custom_target(vtkpython_pyc ALL
421421
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/vtk_compile_complete")
422-
add_dependencies(vtkpython_pyc
423-
vtkpython
424-
)
422+
if(TARGET vtkpython)
423+
add_dependencies(vtkpython_pyc
424+
vtkpython
425+
)
426+
endif()
425427

426428
# If no runtime is to be installed then do not install python modules.
427429
if(NOT VTK_INSTALL_NO_RUNTIME)

0 commit comments

Comments
 (0)