<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
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.<div><br></div><div><div><div> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Bitstream Vera Sans; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">-- </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Mike Jackson   Senior Research Engineer</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Innovative Management &amp; Technology Services</div><br class="Apple-interchange-newline"></span> </div><br><div><div>On Dec 19, 2007, at 2:22 PM, Hughes, Mike wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">  <div dir="ltr" align="left"><span class="515241919-19122007"><font face="Arial" color="#0000ff" size="2">Thanks for the help.  </font></span><span class="515241919-19122007"><font face="Arial" color="#0000ff" size="2">I tried both qmake and qmake-qt4 (I'm also a QT newbie) in the QT_QMAKE_EXECUTABLE variable</font></span></div> <div dir="ltr"><font face="Arial" color="#0000ff" size="2">I now get the error:</font></div> <div dir="ltr"><font face="Arial"><font color="#0000ff"><font size="2"><span class="515241919-19122007">    </span>Multiple versions of QT found please set DESIRED_QT_VERSION</font></font></font></div> <div dir="ltr"><font face="Arial"><font color="#0000ff"><font size="2"><span class="515241919-19122007">    </span>Multiple versions of QT found please set DESIRED_QT_VERSION</font></font></font></div> <div dir="ltr"><font face="Arial"><font color="#0000ff"><font size="2"><span class="515241919-19122007">    </span>Multiple versions of QT found please set DESIRED_QT_VERSION</font></font></font></div> <div dir="ltr"><font face="Arial"><font color="#0000ff"><font size="2"><span class="515241919-19122007">    </span>CMake Error: This project requires some variables to be set,</font></font></font></div> <div dir="ltr"><font face="Arial"><font color="#0000ff"><font size="2"><span class="515241919-19122007">    </span>and cmake can not find them.</font></font></font></div> <div dir="ltr"><font face="Arial"><font color="#0000ff"><font size="2"><span class="515241919-19122007">    </span>Please set the following variables:</font></font></font></div> <div dir="ltr"><font face="Arial"><font color="#0000ff"><font size="2"><span class="515241919-19122007">    </span>QT_QT_LIBRARY (ADVANCED)</font></font></font></div> <div dir="ltr"><font face="Arial"><font color="#0000ff"><font size="2"><span class="515241919-19122007">    </span>By the way here is what ccmake looks like for me (with QT_QMAKE_EXECUTABLE set to qmake-qt4):</font></font></font></div> <div dir="ltr"> </div> <div dir="ltr"><font face="Arial"><font color="#0000ff"><font size="2"><span class="515241919-19122007">                                                                                            </span>Page 1 of 1</font></font></font></div> <div dir="ltr"><font face="Arial" color="#0000ff" size="2">CMAKE_BACKWARDS_COMPATIBILITY 2.4</font></div> <div dir="ltr"><font face="Arial" color="#0000ff" size="2">CMAKE_BUILD_TYPE</font></div> <div dir="ltr"><font face="Arial" color="#0000ff" size="2">CMAKE_INSTALL_PREFIX /usr/local</font></div> <div dir="ltr"><font face="Arial" color="#0000ff" size="2">DESIRED_QT_VERSION</font></div> <div dir="ltr"><font face="Arial" color="#0000ff" size="2">EXECUTABLE_OUTPUT_PATH</font></div> <div dir="ltr"><font face="Arial" color="#0000ff" size="2">LIBRARY_OUTPUT_PATH</font></div> <div dir="ltr"><font face="Arial" color="#0000ff" size="2">QT_QMAKE_EXECUTABLE /usr/bin/qmake-qt4</font></div> <div dir="ltr"><font face="Arial" color="#0000ff" size="2">VTK_DIR /usr/sbin/../lib/vtk-5.0</font></div> <div dir="ltr"><font face="Arial"><font size="2"><font color="#0000ff"><font face="Arial" color="#0000ff" size="2"></font></font></font></font> </div> <div dir="ltr"><span class="515241919-19122007"><font face="Arial" color="#0000ff" size="2">(I'm new to this list, so I'm not sure whether I should reply directly to you, or the vtkuser list)</font></span></div> <div dir="ltr"><font face="Arial"><font size="2"><font color="#0000ff"><font size="2"></font></font></font></font> </div> <div dir="ltr"><font face="Arial"><font size="2"><font color="#0000ff"><font size="2"></font></font></font></font> </div> <div dir="ltr"><font face="Arial"><font size="2"><font color="#0000ff"><font size="2"></font></font></font></font> </div> <div dir="ltr"><font face="Arial"><font size="2"><font color="#0000ff"><font size="2"></font></font></font></font> </div> <div dir="ltr"><font face="Arial"><font size="2"><font color="#0000ff"><font size="2"></font></font></font></font> </div> <div dir="ltr"><font face="Arial" color="#0000ff" size="2">CMAKE_BACKWARDS_COMPATIBILITY: For backwards compatibility, what version of CMake commands and syntax should this version of CMake allow.</font></div> <div dir="ltr"><font face="Arial" color="#0000ff" size="2">Press [enter] to edit option CMake Version 2.4 - patch 7</font></div> <div dir="ltr"><font face="Arial" color="#0000ff" size="2">Press [c] to configure</font></div> <div dir="ltr"><font face="Arial" color="#0000ff" size="2">Press [h] for help Press [q] to quit without generating</font></div> <div dir="ltr"><font face="Arial" color="#0000ff" size="2">Press [t] to toggle advanced mode (Currently Off)</font></div> <div dir="ltr" align="left"><font face="Arial"><font size="2"><font color="#0000ff"></font></font></font> </div> <div><font face="Arial" color="#0000ff" size="2"><br></font> </div> <div class="OutlookMessageHeader" lang="en-us" dir="ltr" align="left"><font face="Arial" color="#0000ff" size="2"> <hr tabindex="-1"> </font><font face="Arial"><font size="2"><font color="#0000ff"><b>From:</b> Mike Jackson [<a href="mailto:imikejackson@gmail.com">mailto:imikejackson@gmail.com</a>] <br><b>Sent:</b> Wednesday, December 19, 2007 12:43 PM<br><b>To:</b> Hughes, Mike<br><b>Subject:</b> Re: [vtkusers] newbie compile question<br><br></font></font></font></div> <div></div> <div><font face="Arial" color="#0000ff" size="2">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.</font></div> <div><font face="Arial" color="#0000ff" size="2"><br></font></div> <div><span class="Apple-style-span" style="WORD-SPACING: 0px; FONT: 12px Bitstream Vera Sans; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; border-spacing: 0px 0px; khtml-text-decorations-in-effect: none; apple-text-size-adjust: auto; orphans: 2; widows: 2"> </span></div> <div style="MARGIN: 0px"><font face="Arial" color="#0000ff" size="2">-- </font></div> <div style="MARGIN: 0px"><font face="Arial" color="#0000ff" size="2">Mike Jackson   Senior Research Engineer</font></div> <div style="MARGIN: 0px"><font face="Arial" color="#0000ff" size="2">Innovative Management &amp; Technology Services</font></div> <div><font face="Arial" color="#0000ff" size="2"><br class="Apple-interchange-newline"></font> </div> <div><font face="Arial" color="#0000ff" size="2"><br></font></div> <div><font face="Arial" color="#0000ff" size="2">On Dec 19, 2007, at 1:38 PM, Hughes, Mike wrote:</font></div> <div><font face="Arial" color="#0000ff" size="2"><br class="Apple-interchange-newline"></font></div> <div><font face="Arial"><font size="2"><font color="#0000ff"><span class="010122118-19122007">I've just downloaded VTK and </span>I'm trying to compile some of the example VTK code found in:</font></font></font></div> <div><font face="Arial"><font size="2"><font color="#0000ff"><font face="Arial" size="2"></font></font></font></font> </div> <div><font face="Arial"><font size="2"><font color="#0000ff"><span class="010122118-19122007">    </span>../VTK/VTK/Examples/GUI/Qt</font></font></font></div> <div><font face="Arial"><font size="2"><font color="#0000ff"><font face="Arial" size="2"></font></font></font></font> </div> <div><font face="Arial"><font size="2"><font color="#0000ff">I cd to the directory above. It has the contents<span class="010122118-19122007">:</span></font></font></font></div> <div><font face="Arial"><font size="2"><font color="#0000ff"><span class="010122118-19122007">    </span>CMakeCache.txt cmake_install.cmake Events Makefile</font></font></font></div> <div><font face="Arial"><font size="2"><font color="#0000ff"><span class="010122118-19122007">    </span>CMakeFiles CMakeLists.txt ImageViewer SimpleView</font></font></font></div> <div><font face="Arial"><font size="2"><font color="#0000ff"><font face="Arial" size="2"></font></font></font></font> </div> <div><font face="Arial" color="#0000ff" size="2">I type:</font></div> <div><font face="Arial"><font size="2"><font color="#0000ff"><span class="010122118-19122007">    </span>ccmake .</font></font></font></div> <div><font face="Arial"><font size="2"><font color="#0000ff"><font face="Arial" size="2"></font></font></font></font> </div> <div><font face="Arial"><font size="2"><font color="#0000ff"><span class="010122118-19122007">but I</span> am not able to correctly set the vairable:</font></font></font></div> <div><font face="Arial"><font size="2"><font color="#0000ff"><font face="Arial"><font size="2"><span class="010122118-19122007"></span></font></font></font></font></font> </div> <div><font face="Arial"><font size="2"><font color="#0000ff"><span class="010122118-19122007">    </span>DESIRED_QT_VERSION </font></font></font></div> <div><font face="Arial"><font size="2"><font color="#0000ff"><font face="Arial" size="2"></font></font></font></font> </div> <div><font face="Arial" color="#0000ff" size="2">I have both have a standard Ubuntu "Gutsy" installation (which seems to have both qt 3 and 4 installed<span class="010122118-19122007"> by default?</span>)</font></div> <div><font face="Arial" color="#0000ff" size="2">I've tried the following values for DESIRED_QT_VERSION:<span class="010122118-19122007"> </span>qt4, qt 4, Qt 4, Qt 4.0, Qt4, Qt4.0, 4, 4.0, 4.3.2 (afer looking in /usr/lib)</font></div> <div><font face="Arial"><font size="2"><font color="#0000ff"><font face="Arial" size="2"></font></font></font></font> </div> <div><font face="Arial" color="#0000ff" size="2">I always get the same error when I try to configure:</font></div> <div><font face="Arial"><font size="2"><font color="#0000ff"><span class="010122118-19122007">    </span>CMake was unable to find desired QT version: 4.3.2. Set advanced values QT_QMAKE_EXECUTABLE and QT4.3.2_QGLOBAL_FILE.</font></font></font></div> <div><font face="Arial"><font size="2"><font color="#0000ff"><span class="010122118-19122007">    </span>Qt GUI library not found.</font></font></font></div> <div><font face="Arial"><font size="2"><font color="#0000ff"><span class="010122118-19122007">    </span>Qt CORE library not found.</font></font></font></div> <div><font face="Arial"><font size="2"><font color="#0000ff"><span class="010122118-19122007">    </span>CMake was unable to find desired QT version: 4.3.2. Set advanced values QT_QMAKE_EXECUTABLE and QT4.3.2_QGLOBAL_FILE.</font></font></font></div> <div><font face="Arial"><font size="2"><font color="#0000ff"><span class="010122118-19122007">    </span>Qt GUI library not found.</font></font></font></div> <div><font face="Arial"><font size="2"><font color="#0000ff"><span class="010122118-19122007">    </span>Qt CORE library not found.</font></font></font></div> <div><font face="Arial"><font size="2"><font color="#0000ff"><span class="010122118-19122007">    </span>CMake Error: Error in cmake code at</font></font></font></div> <div><font face="Arial"><font size="2"><font color="#0000ff"><span class="010122118-19122007">    </span>/home/msh/Documents/Research/SourceFiles/VTKStuff/VTK/VTK/Examples/GUI/Qt/SimpleView/CMakeLists.txt:37:</font></font></font></div> <div><font face="Arial"><font size="2"><font color="#0000ff"><span class="010122118-19122007">    </span>Unknown CMake command "QT4_WRAP_UI".</font></font></font></div> <div><font face="Arial"><font size="2"><font color="#0000ff"><font face="Arial"><font size="2"><font face="Arial" size="2"></font></font></font></font></font></font> </div> <div><font face="Arial" color="#0000ff" size="2">I've looked in CMakeLists.txt, its contents are:</font></div> <div><font face="Arial"><font size="2"><font color="#0000ff"><font face="Arial"><font size="2"><font face="Arial" size="2"></font></font></font></font></font></font> </div> <div><font face="Arial"><font size="2"><font color="#0000ff"><span class="010122118-19122007">    </span>SUBDIRS(ImageViewer SimpleView Events)</font></font></font></div> <div><font face="Arial"><font size="2"><font color="#0000ff"><font face="Arial"><font size="2"><font face="Arial" size="2"></font></font></font></font></font></font> </div> <div><font face="Arial" color="#0000ff" size="2">which doesn't seem to tell me much.</font></div> <div><font face="Arial"><font size="2"><font color="#0000ff"><font face="Arial" size="2"></font></font></font></font> </div> <div><font face="Arial" color="#0000ff" size="2">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)?</font></div> <div><font face="Arial"><font size="2"><font color="#0000ff"><font face="Arial" size="2"></font></font></font></font> </div> <div style="MARGIN: 0px"><font face="Arial" color="#0000ff" size="2">_______________________________________________</font></div> <div style="MARGIN: 0px"><font face="Arial"><font size="2"><font color="#0000ff">This is the private VTK discussion list.<span class="Apple-converted-space"> </span></font></font></font></div> <div style="MARGIN: 0px"><font face="Arial" color="#0000ff" size="2">Please keep messages on-topic. Check the FAQ at: </font><a href="http://www.vtk.org/Wiki/VTK_FAQ"><font face="Arial" size="2">http://www.vtk.org/Wiki/VTK_FAQ</font></a></div> <div style="MARGIN: 0px"><font face="Arial" color="#0000ff" size="2">Follow this link to subscribe/unsubscribe:</font></div> <div style="MARGIN: 0px"><a href="http://www.vtk.org/mailman/listinfo/vtkusers"><font face="Arial" size="2">http://www.vtk.org/mailman/listinfo/vtkusers</font></a></div> <div><font face="Arial" color="#0000ff" size="2"><br></font></div></blockquote></div><br></div></div></body></html>