No env var, use -D<div><br><br><div class="gmail_quote">On Wed, Mar 11, 2009 at 2:35 PM, Michael Jackson <span dir="ltr">&lt;<a href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Just to be clear on that, I know QT_QMAKE_EXECUTABLE is a CMake variable but is there a corresponding environment variable for that?<br>

<br>
or should be we doing cmake -DQT_QMAKE_EXECUTABLE:PATH=/usr/local/qt/bin/qmake ../<br>
<br>
<br>
---<br>
Mike Jackson                 <a href="http://www.bluequartz.net" target="_blank">www.bluequartz.net</a><div><div></div><div class="h5"><br>
<br>
<br>
<br>
On Mar 11, 2009, at 2:22 PM, David Cole wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
If you set QT_QMAKE_EXECUTABLE to the full path to a qmake, *that* qmake is used above all else to find the right Qt. Regardless of QTDIR or PATH.<br>
<br>
Setting QT_QMAKE_EXECUTABLE is *the* official way to tell CMake where the Qt that you want is. All else is a &quot;find-and-guess&quot; game if you have multiple Qt&#39;s available.<br>
<br>
<br>
HTH,<br>
David<br>
<br>
<br>
On Wed, Mar 11, 2009 at 1:46 PM, Michael Jackson &lt;<a href="mailto:mike.jackson@bluequartz.net" target="_blank">mike.jackson@bluequartz.net</a>&gt; wrote:<br>
You can always do:<br>
<br>
export QTDIR=/home/dhenry/qtsdk-2009.01/qt<br>
export PATH=$QTDIR/bin:$PATH<br>
<br>
to put the desired qmake as the first one found.<br>
<br>
_________________________________________________________<br>
Mike Jackson                  <a href="mailto:mike.jackson@bluequartz.net" target="_blank">mike.jackson@bluequartz.net</a><br>
BlueQuartz Software                    <a href="http://www.bluequartz.net" target="_blank">www.bluequartz.net</a><br>
Principal Software Engineer                  Dayton, Ohio<br>
<br>
<br>
<br>
<br>
On Mar 11, 2009, at 1:34 PM, Doug Henry wrote:<br>
<br>
thanks for the responses.  I may have missed a detail somewhere.  I set QTDIR (environment and I tried in cmake file) but it always finds the same version of Qt.  Below is a listing of my attempts.  cmake always finds version 4.3.4, which is installed in /tools/lin64, but my QTDIR variable points to the qmake directory for the newest 4.5.0 version of Qt SDK.  If I change my path so /home/dhenry/qtsdk-2009.01/qt/bin is first, then cmake will find version 4.5.  any thoughts on my usage of QTDIR?<br>

<br>
(lin64):~/tmp/build$ echo $QTDIR<br>
/home/dhenry/qtsdk-2009.01/qt/bin<br>
<br>
(lin64):~/tmp/build$ which qmake<br>
/tools/lin64/bin/qmake<br>
<br>
(lin64):~/tmp/build$ ls /home/dhenry/qtsdk-2009.01/qt/bin/qmake<br>
/home/dhenry/qtsdk-2009.01/qt/bin/qmake<br>
<br>
<br>
On Wed, Mar 11, 2009 at 12:58 PM, Pau Garcia i Quiles &lt;<a href="mailto:pgquiles@elpauer.org" target="_blank">pgquiles@elpauer.org</a>&gt; wrote:<br>
On Wed, Mar 11, 2009 at 5:48 PM, Boudewijn Rempt &lt;<a href="mailto:boud@valdyas.org" target="_blank">boud@valdyas.org</a>&gt; wrote:<br>
&gt; On Wed, 11 Mar 2009, Doug Henry wrote:<br>
&gt;<br>
&gt;&gt; I have multiple Qt installations and would like to know how I guide the<br>
&gt;&gt; find_package(Qt4) command to find the correct one.  I assume there is a<br>
&gt;&gt; variable I can set which defines the search path, which will allow me to<br>
&gt;&gt; change the path to find a different installed version.  Thanks.<br>
&gt;<br>
&gt; Afaik, that uses the location of the first qmake it finds on the path<br>
<br>
In addition to that, if you use the CVS version of CMake, you can<br>
specify a particular version of Qt:<br>
<br>
FIND_PACKAGE( Qt4 4.4.3 )<br>
<br>
That means &quot;prefer 4.4.3&quot; to any other version. If you add EXACT to<br>
that, it will only accept Qt 4.4.3:<br>
<br>
FIND_PACKAGE( Qt4 4.4.3 EXACT )<br>
<br>
You can also use the COMPONENTS syntax instead of SET(<br>
QT_USE_component) to say what components you want:<br>
<br>
FIND_PACKAGE( Qt4 COMPONENTS QtGui QtXml QtNetwork )<br>
<br>
--<br>
Pau Garcia i Quiles<br>
<a href="http://www.elpauer.org" target="_blank">http://www.elpauer.org</a><br>
(Due to my workload, I may need 10 days to answer)<br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
<br>
</blockquote>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br></div>