Skip to content

vtk 9.0 autoinit fix#20086

Merged
opencv-pushbot merged 1 commit intoopencv:masterfrom
rogday:vtk9_world
May 19, 2021
Merged

vtk 9.0 autoinit fix#20086
opencv-pushbot merged 1 commit intoopencv:masterfrom
rogday:vtk9_world

Conversation

@rogday
Copy link
Copy Markdown
Member

@rogday rogday commented May 14, 2021

One of two PRs to fix #19386
The second one is opencv/opencv_contrib#2951

#message(STATUS "${OPENCV_MODULE_${the_module}_SOURCES}")
ocv_create_module(${link_deps})

if(VTK_VERSION VERSION_GREATER_EQUAL "8.90.0")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What is about using of this check instead: COMMAND vtk_module_autoinit ?

We also need checks for:

  • enabled viz module itself: "opencv_viz" IN OPENCV_MODULES_BUILD
  • and viz is part of "opencv_world" OPENCV_MODULE_opencv_viz_IS_PART_OF_WORLD

Can we move that into "viz/CMakeLists.txt" ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

These are valid points, I'm going to fix it tomorrow. As for moving vtk_module_autoinit(TARGETS opencv_world MODULES ${VTK_LIBRARIES}) in viz/CMakeLists.txt - I don't believe its possible because it requires opencv_world target to exist.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I decided to leave VTK_VERSION be in order to be consistent with cmake/OpenCVDetectVTK.cmake. If opencv_viz is a part of world(I added this check), doesnt that mean it is already in OPENCV_MODULES_BUILD?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We need both checks here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed it.

Copy link
Copy Markdown
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

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

Well done 👍

@opencv-pushbot opencv-pushbot merged commit 0f11b1f into opencv:master May 19, 2021
@alalek alalek mentioned this pull request Jun 4, 2021
@rogday rogday deleted the vtk9_world branch October 7, 2021 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: build/install category: viz OpenCV 4.0+: moved to opencv_contrib

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenCV 4.5.1 cannot properly initialize VTK 9.0.1 during build with opencv_world

3 participants