Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version
  1. i'm using mingw, so your details will vary, but the essence of it is: using cmake, building VTK follows pretty much the same process as building opencv.
  2. i got vtk7.0.0 (the src archive).
  3. cd vtk7.0.0; mkdir build; cd build; # the fundamental things apply ..
  4. cmake-gui ..
    • due to mingw64, so i had to specify c++ compiler, make utility, and such (nothing new)
    • it needed 3 configure passes, each one would add like 15 new options (!), i left them all at default.
    • though it's probably a better idea, to build static libs, i did not dare to get experimental (mingw, again), and left it to default(dynamic)
  5. make (build VTK.sln, or whatever it generates) # ...as time goes by ...
  6. (an hour later) make install (build INSTALL project). you need to be admin for that ! (because the default is "C:\Program Files (x86)\VTK", maybe it's wise to choose a different CMAKE_INSTALL_PREFIX here)
  7. hey, done with VTK !
  8. back to opencv / cmake. make sure, you have WITH_VTK set and VTK_DIR pointing to your install folder
  9. make && make install. yikes, it really build the viz module (opencv_viz310.a in my case) ! xD
  10. add "C:\Program Files (x86)\VTK\bin" to the PATH env var, so it finds all the dlls at runtime