3

I'm trying to compile OpenCV on Windows 10 with all the modules (following this tutorial).

This is the error I get after pressing "Configure":

VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory,
or to VTK install subdirectory with VTKConfig.cmake file

I've installed VTK 7 by the msi file.

I tried to specify a library path but it didn't help (using the same method from here), and also set an environment path for this.

What else can I do to pass this error?

tambre
  • 4,625
  • 4
  • 42
  • 55
Guy P
  • 1,395
  • 17
  • 33
  • Probably a duplicate of http://stackoverflow.com/q/39126648/2799037 Have you deleted your CMake cache file? – usr1234567 Dec 06 '16 at 06:37
  • 1
    sure, did nothing. – Guy P Dec 07 '16 at 09:19
  • Have you tried with VTK 6? The 7 is maybe too new? – usr1234567 Dec 07 '16 at 10:45
  • I tried, after the first configuration, I'm changing the `VTK_DIR` from `VTK_DIR-NOTFOUND` to the bin folder, But after pressing `Configure` again - the error message is the sane, and the `VTK_DIR` value change back to not-found. What is it ?? – Guy P Dec 12 '16 at 23:00
  • I observe the same nonsence even now in 2017 :) https://stackoverflow.com/questions/46268235/cmake-gui-resets-parameter-how-do-i-set-parameter-in-cmake-gui?noredirect=1#comment79499006_46268235 – Stepan Yakovenko Sep 17 '17 at 19:56
  • I've had to do `-DVTK_DIR="F:\Programme\Libs\VTK-9.1.0\clion-mingw-build-release` where the path is the folder that contains the `bin` folder, and more importantly that contains a `vtk-config.cmake` – lucidbrot Apr 26 '22 at 15:46

0 Answers0