Skip to content

OpenCV 4.5.1 cannot properly initialize VTK 9.0.1 during build with opencv_world #19386

@jingyuan129931

Description

@jingyuan129931

Sir,
I compiled opencv4.5.1 with a line surface error

CMake Error at C:/Program Files (x86)/VTK/lib/cmake/vtk-9.0/vtkModule.cmake:2955 (get_property):
  get_property could not find TARGET opencv_viz.  Perhaps it has not yet been
  created.
Call Stack (most recent call first):
  E:/opencv_contrib-4.5.1/modules/viz/CMakeLists.txt:43 (vtk_module_autoinit)
  modules/world/CMakeLists.txt:13 (include)
  modules/world/CMakeLists.txt:32 (include_one_module)


CMake Error at C:/Program Files (x86)/VTK/lib/cmake/vtk-9.0/vtkModule.cmake:2962 (target_compile_definitions):
  Cannot specify compile definitions for target "opencv_viz" which is not
  built by this project.
Call Stack (most recent call first):
  E:/opencv_contrib-4.5.1/modules/viz/CMakeLists.txt:43 (vtk_module_autoinit)
  modules/world/CMakeLists.txt:13 (include)
  modules/world/CMakeLists.txt:32 (include_one_module)

But I've compiled vtk9.0.1.

Metadata

Metadata

Assignees

Labels

category: build/installcategory: contribTarget patches to **opencv_contrib** repository: https://github.com/opencv/opencv_contribcategory: vizOpenCV 4.0+: moved to opencv_contribconfirmedThere is stable reproducer / investigation complete

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions