[vtkusers] CMAKE + VTK + QT

Nicolas RANNOU nrannou at bwh.harvard.edu
Tue Sep 15 15:28:20 EDT 2009


So now I built VTK properly but I can't compile the QT examples.

settings:


 CMAKE_BACKWARDS_COMPATIBILITY    2.4                                      
   
 CMAKE_BUILD_TYPE                                                          
   
 CMAKE_INSTALL_PREFIX             /usr/local                               
   
 DESIRED_QT_VERSION               4                                        
   
 EXECUTABLE_OUTPUT_PATH                                                    
   
 LIBRARY_OUTPUT_PATH                                                       
   
 QT_QMAKE_EXECUTABLE              /usr/bin/qmake-NOTFOUND                  
   
 VTK_DIR                          /usr/lib/vtk-5.0      

output:

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

It is very strange because during VTK build, cmake finds qmake at the same
path and when I try to build the example it does not find it.


Nicolas

On Tue, 15 Sep 2009 12:36:10 -0600, Clinton Stimpson <clinton at elemtech.com>
wrote:
> 
> Then can you check the following variables, and report their values?
> QT_LIBRARY_DIR
> QT_INCLUDE_DIR
> QT_MOC_EXECUTABLE
> QT_UIC_EXECUTABLE
> QT_RCC_EXECUTABLE
> QT_QTCORE_LIBRARY
> 
> They all need to be filled in and correct, or you'll get that Qt was not
> found
> error.  I think last time it came to this on this list, the installation
> of Qt
> was incorrect.
> 
> Clint
> 
> On Tuesday 15 September 2009 12:30:17 pm Nicolas RANNOU wrote:
>> /usr/bin/qmake --version gives
>>
>> QMake version 2.01a
>> Using Qt version 4.5.0 in /usr/lib
>>
>> Nicolas
>>
>>
>> On Tue, 15 Sep 2009 12:29:15 -0600, Clinton Stimpson
> <clinton at elemtech.com>
>>
>> wrote:
>> > And what does
>> > /usr/bin/qmake --version give?
>> >
>> > Clint
>> >
>> > On Tuesday 15 September 2009 12:23:24 pm Nicolas RANNOU wrote:
>> >> Thanks Clint I missed it...
>> >>
>> >> So no I turned on VTK_USE_QVTK and VTK_USE_GUISUPPORT.
>> >> but during the configuration of the cmake, when I set the
>> >> QT_DESIRED_VERSION to 4 then when I configure it again,  cmake is not
>> >
>> > able
>> >
>> >> to find qt:
>> >>
>> >> cmake output:
>> >> Qt was not found
>> >>
>> >>
>> >> same error when I set the path to the qmake executable manually:
>> >>
>> >>  QT_QMAKE_EXECUTABLE              /usr/bin/qmake-NOTFOUND
>> >>
>> >> ...
>> >>
>> >> Thanks,
>> >>
>> >> Nicolas
>> >>
>> >>
>> >> On Tue, 15 Sep 2009 11:16:48 -0600, Clinton Stimpson
>> >
>> > <clinton at elemtech.com>
>> >
>> >> wrote:
>> >> >> A strange thing I must have noticed first, is that when I built
> vtk,
>> >
>> > I
>> >
>> >> >> can't turn on/off  VTK_USE_QVTK and VTK_USE_GUISUPPORT.
>> >> >>
>> >> >> The options are not available in cmake when I run "ccmake ../VTK",
> to
>> >> >> configure cmakelists before building VTK.
>> >> >
>> >> > Hit the 't' button in ccmake to see advanced variables.
>> >> > You'll see VTK_USE_GUISUPPORT.  Turn it on, and configure again,
> then
>> >> > VTK_USE_QVTK will show up.  Turn it on, then configure again.  Then
>> >
>> > the
>> >
>> >> Qt
>> >>
>> >> > related variables will show up.
>> >> >
>> >> > So yes, you need to build VTK with Qt support before you can build
>> >> > examples.
>> >> > Or, install the libvtk5-qt4-dev package (from previous messages,
> you
>> >
>> > were
>> >
>> >> > using ubuntu, right?), if you don't have a real reason to build it
>> >> > yourself.
>> >> >
>> >> > Clint




More information about the vtkusers mailing list