Skip to content

Commit 4fc6995

Browse files
committed
Merge pull request #2951 from rogday:vtk9_world
2 parents b619a06 + 567e40c commit 4fc6995

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/viz/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ if (VTK_VERSION VERSION_LESS "8.90.0")
4040
ocv_target_link_libraries(${the_module} PRIVATE ${VTK_LIBRARIES})
4141
else ()
4242
ocv_target_link_libraries(${the_module} PRIVATE ${VTK_LIBRARIES})
43-
vtk_module_autoinit(TARGETS ${the_module} MODULES ${VTK_LIBRARIES})
43+
if(NOT BUILD_opencv_world OR NOT OPENCV_MODULE_${the_module}_IS_PART_OF_WORLD)
44+
vtk_module_autoinit(TARGETS ${the_module} MODULES ${VTK_LIBRARIES})
45+
endif()
4446
endif()
4547

4648
if(APPLE AND BUILD_opencv_viz)

0 commit comments

Comments
 (0)