From: Smirnov Egor Date: Fri, 14 May 2021 16:03:14 +0000 (+0300) Subject: vtk 9.0 autoinit fix X-Git-Tag: accepted/tizen/unified/20220125.121719~1^2~78^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6376a3aef29f0ae8ba8c5d7be719c1382370d5da;p=platform%2Fupstream%2Fopencv.git vtk 9.0 autoinit fix --- diff --git a/modules/world/CMakeLists.txt b/modules/world/CMakeLists.txt index 20edbd5..2f4b1a4 100644 --- a/modules/world/CMakeLists.txt +++ b/modules/world/CMakeLists.txt @@ -59,6 +59,10 @@ ocv_module_include_directories() #message(STATUS "${OPENCV_MODULE_${the_module}_SOURCES}") ocv_create_module(${link_deps}) +if(";${OPENCV_MODULES_BUILD};" MATCHES ";opencv_viz;" AND OPENCV_MODULE_opencv_viz_IS_PART_OF_WORLD AND VTK_VERSION VERSION_GREATER_EQUAL "8.90.0") + vtk_module_autoinit(TARGETS opencv_world MODULES ${VTK_LIBRARIES}) +endif() + ocv_target_compile_definitions(${the_module} PRIVATE OPENCV_MODULE_IS_PART_OF_WORLD=1) if(BUILD_opencv_imgcodecs AND OPENCV_MODULE_opencv_imgcodecs_IS_PART_OF_WORLD)