[vtkusers] newbie compile question

Mike Jackson imikejackson at gmail.com
Wed Dec 19 14:28:15 EST 2007


Ok.. Here is a better way to do this. Delete the CMakeCache.txt from  
your build directory. (The directory that you are trying to build the  
Qt related stuff in. NOW, in your .bash_profile (or equivalent) set  
the 'QTDIR' environment variable to the root of the Qt4 installation,  
so that if you were to use ${QTDIR}/bin/qmake , qmake would actually  
execute. Source the new .bash_profile. Now run ccmake and see if the  
proper Qt is picked up.

-- 
Mike Jackson   Senior Research Engineer
Innovative Management & Technology Services


On Dec 19, 2007, at 2:22 PM, Hughes, Mike wrote:

> Thanks for the help.  I tried both qmake and qmake-qt4 (I'm also a  
> QT newbie) in the QT_QMAKE_EXECUTABLE variable
> I now get the error:
>     Multiple versions of QT found please set DESIRED_QT_VERSION
>     Multiple versions of QT found please set DESIRED_QT_VERSION
>     Multiple versions of QT found please set DESIRED_QT_VERSION
>     CMake Error: This project requires some variables to be set,
>     and cmake can not find them.
>     Please set the following variables:
>     QT_QT_LIBRARY (ADVANCED)
>     By the way here is what ccmake looks like for me (with  
> QT_QMAKE_EXECUTABLE set to qmake-qt4):
>
>                                                                        
>                       Page 1 of 1
> CMAKE_BACKWARDS_COMPATIBILITY 2.4
> CMAKE_BUILD_TYPE
> CMAKE_INSTALL_PREFIX /usr/local
> DESIRED_QT_VERSION
> EXECUTABLE_OUTPUT_PATH
> LIBRARY_OUTPUT_PATH
> QT_QMAKE_EXECUTABLE /usr/bin/qmake-qt4
> VTK_DIR /usr/sbin/../lib/vtk-5.0
>
> (I'm new to this list, so I'm not sure whether I should reply  
> directly to you, or the vtkuser list)
>
>
>
>
>
> CMAKE_BACKWARDS_COMPATIBILITY: For backwards compatibility, what  
> version of CMake commands and syntax should this version of CMake  
> allow.
> Press [enter] to edit option CMake Version 2.4 - patch 7
> Press [c] to configure
> Press [h] for help Press [q] to quit without generating
> Press [t] to toggle advanced mode (Currently Off)
>
>
>
> From: Mike Jackson [mailto:imikejackson at gmail.com]
> Sent: Wednesday, December 19, 2007 12:43 PM
> To: Hughes, Mike
> Subject: Re: [vtkusers] newbie compile question
>
> I would suggest using ccmake and finding the QT_QMAKE_EXECUTBLE  
> variable and setting that. Once that is set to the qmake  
> executable, then "configure" again and cmake should be able to find  
> everything that it needs.
>
>
> -- 
> Mike Jackson   Senior Research Engineer
> Innovative Management & Technology Services
>
>
>
> On Dec 19, 2007, at 1:38 PM, Hughes, Mike wrote:
>
> I've just downloaded VTK and I'm trying to compile some of the  
> example VTK code found in:
>
>     ../VTK/VTK/Examples/GUI/Qt
>
> I cd to the directory above. It has the contents:
>     CMakeCache.txt cmake_install.cmake Events Makefile
>     CMakeFiles CMakeLists.txt ImageViewer SimpleView
>
> I type:
>     ccmake .
>
> but I am not able to correctly set the vairable:
>
>     DESIRED_QT_VERSION
>
> I have both have a standard Ubuntu "Gutsy" installation (which  
> seems to have both qt 3 and 4 installed by default?)
> I've tried the following values for DESIRED_QT_VERSION: qt4, qt 4,  
> Qt 4, Qt 4.0, Qt4, Qt4.0, 4, 4.0, 4.3.2 (afer looking in /usr/lib)
>
> I always get the same error when I try to configure:
>     CMake was unable to find desired QT version: 4.3.2. Set  
> advanced values QT_QMAKE_EXECUTABLE and QT4.3.2_QGLOBAL_FILE.
>     Qt GUI library not found.
>     Qt CORE library not found.
>     CMake was unable to find desired QT version: 4.3.2. Set  
> advanced values QT_QMAKE_EXECUTABLE and QT4.3.2_QGLOBAL_FILE.
>     Qt GUI library not found.
>     Qt CORE library not found.
>     CMake Error: Error in cmake code at
>     /home/msh/Documents/Research/SourceFiles/VTKStuff/VTK/VTK/ 
> Examples/GUI/Qt/SimpleView/CMakeLists.txt:37:
>     Unknown CMake command "QT4_WRAP_UI".
>
> I've looked in CMakeLists.txt, its contents are:
>
>     SUBDIRS(ImageViewer SimpleView Events)
>
> which doesn't seem to tell me much.
>
> How do I correctly set this variable (I've also tried the values:  
> qt3, qt 3, Qt 3, Qt 3.0, Qt3, Qt3.0, 3, 3.0)?
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/ 
> Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20071219/bf516f9f/attachment.htm>


More information about the vtkusers mailing list