Cmake dont find VTK library [SOLVED]



  • Hi guys!
    I'm trying to compile my qt project with cmake, and i have this error:

                     from /home/lays/Dropbox/Br-Print/Pandora/Windows/aboutbrprint.cpp:4:
    /home/lays/Dropbox/Br-Print/Pandora/./vtkWidget.h:1:25: fatal error: QVTKWidget2.h: No such file or directory
     #include <QVTKWidget2.h>
                             ^
    compilation terminated.
    

    And the error continues even through the library path.

    cmake ../Pandora -DVTK_DIR=/usr/local/include/vtk-6.3
    

    Any tips to discover what the hell is happened?
    See ya!



  • VTK_DIR should be set to the cmake directory; not the include directory. Probably the following in your case:

    /usr/local/lib/cmake/vtk-6.3
    

    You'll also need the following in your CMakeLists.txt file

    find_package(VTK REQUIRED)
    include(${VTK_USE_FILE})
    

Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.