[vtkusers] CMAKE + VTK + QT

Nicolas RANNOU nrannou at bwh.harvard.edu
Mon Sep 14 12:13:55 EDT 2009


Hi all, 

I'm currently trying to build the QT examples in VTK/Examples/GUI.

I'm working on ubuntu 9.

I built cmake doing: sudo apt-get install cmake
I built qt doing: downloading sources from http://qt.nokia.com/downloads
and executing the downloaded file (last version).
I downoaded vtk on kitware website (last version) then built it with cmake.

QT and VTK work separately.

But I can't get the vtk QT examples working. I can't even build the
CMakeLists.txt .


I get the following errors when I configure the cmake.

/--------------------------------------------------------/
 Multiple versions of QT found please set DESIRED_QT_VERSION

 CMake Error: The following variables are used in this project, but they
are set to NOTFOUND.
 Please set them or make sure they are set and tested correctly in the
CMake files:
 QT_INCLUDE_DIR (ADVANCED)
    used as include directory in directory /home/nico/Work/SimpleView
 QT_QT_LIBRARY (ADVANCED)
     linked by target "qtsimpleview" in directory
/home/nico/Work/SimpleView
/--------------------------------------------------------/

I changed the QT desired version number to 4 but there are still errors:


/--------------------------------------------------------/

 CMake was unable to find desired QT version: 4. Set advanced values
QT_QMAKE_EXECUTABLE and QT4_QGLOBAL_FILE.

 CMake Error: The following variables are used in this project, but they
are set to NOTFOUND.
 Please set them or make sure they are set and tested correctly in the
CMake files:
 QT_INCLUDE_DIR (ADVANCED)
    used as include directory in directory /home/nico/Work/SimpleView
/--------------------------------------------------------/

I've been searching a lot on the internet but I couldn't find the solution.
Maybe do I do something wrong during the installation... Another strange
thing is that when I configure the CMakelists.txt to build VTK, via the
GUI, I can't turn USE_QT on or off (the option is not available)

Thanks a lot for your help,


Nicolas




More information about the vtkusers mailing list