<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:9pt;font-family:Monospace">
<p>On Thursday 23 September 2010, Clinton Stimpson wrote:</p>
<p>> On Thursday, September 23, 2010 01:40:02 pm Alexander Neundorf wrote:</p>
<p>...</p>
<p>> > This was committed here:</p>
<p>> > http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b55da4c688bbf55b442908</p>
<p>> >46 4e0f7e2e41c937a3 which has as commit message "Add cross-compiling</p>
<p>> > support to FindQt4.cmake"</p>
<p>> ></p>
<p>> > What speaks against adding the NO_DEFAULT_PATH again ?</p>
<p>></p>
<p>> It was removed so it would be possible to use CMAKE_PREFIX_* for cross-</p>
<p>> compiling with Qt.  This is because the output of "qmake -query" cannot be</p>
<p>> relied on when cross-compiling, because it only has native Qt paths.</p>
<p></p>
<p>We assume that the qmake which is found belongs to the Qt which is wanted, right ?</p>
<p>This qmake is, also when crosscompiling, a native host binary in general, right ?</p>
<p>Because I guess when cross compiling with qmake (not cmake), this qmake is used to generate the makefiles for cross compiling.</p>
<p>And this one really reports the library dir for the host, not for the cross compiling target ?</p>
<p></p>
<p>How about something like this:</p>
<p></p>
<p>GET_FILENAME_COMPONENT(_qt_base_dir ${QT_QMAKE_EXECUTABLE} PATH)</p>
<p>GET_FILENAME_COMPONENT(_qt_base_dir ${_qt_base_dir} PATH)</p>
<p>...</p>
<p>FIND_LIBRARY(QT_QTCORE_LIBRARY_RELEASE</p>
<p>             NAMES QtCore${QT_LIBINFIX} QtCore${QT_LIBINFIX}4</p>
<p>             HINTS ${QT_LIBRARY_DIR_TMP} ${_qt_base_dir}/lib </p>
<p>             NO_DEFAULT_PATH )</p>
<p>    )</p>
<p></p>
<p>I.e. we check only in the directory reported by qmake and additionally in {qmake_dir}/../lib/ ?</p>
<p>The order of the two could also be exchanged.</p>
<p></p>
<p>> So are you saying the problem only comes up if CMAKE_PREFIX_PATH contains</p>
<p>> the root directory of a Qt installation that you don't want to use, and</p>
<p>> QT_QMAKE_EXECUTABLE is set to the qmake of the installation you want to</p>
<p>> use?</p>
<p></p>
<p>Yes.</p>
<p></p>
<p>Alex</p>
<p></p>
</body></html>