Finding qmake

Michael Biebl mbiebl at gmail.com
Fri Jun 23 17:14:07 CEST 2006


2006/6/23, Simon Perreault <nomis80 at nomis80.org>:
> Hi,
>
> Currently, FindQt4.cmake searches for "qmake" before "qmake-qt4". I think
> that's wrong and that it should be reversed.
>
> Why: When qmake (from Qt3) and qmake-qt4 are in the $PATH, the check fails
> unless the order is reversed.
>
> Why not: I can't see any reason why not.
>
> I'm asking because my commit r544680 was reversed by Alexander Neundorf in
> r549218. I contacted him, but he wouldn't provide me with any justification.
> His commit message is as follows:
>
> "first check for qmake, then for qmake-qt4, this is in sync with cmake's
> FindQt4.cmake and better for us (as we use qt-copy)"
>
> My rebuttal:
>
> 1) "In sync with cmake's FindQt4.cmake": Yes, that's why the fix should be
> sent upstream. It's not a reason to preserve a bug.
>
> 2) "Better for us (as we use qt-copy)": I simply don't understand that
> argument. If qmake-qt4 isn't found, it will look for qmake. So the one
> residing in qt-copy would be used, and everyone is happy.

First of all qmake-qt4 (and the other tools like uic-qt4, moc-qt4) are
a Debian specific thingie.
Now, for example you have the libqt4-dev package installed on Debian,
which provides the qmake-qt4 executable and the other qt4 development
files. But as KDE4 requires qt-copy (it does not compile against plain
qt-4.1.3 atm) so you install qt-copy into /opt/qt-copy and adjust the
PATH environment variable to PATH=/opt/qt-copy/bin:$PATH.
But if qmake-qt4 is preferred over qmake, /opt/qt-copy/bin/qmake will
not be taken, which is wrong.
In conclusion: The current behaviour is correct.
Btw: If you have both qt3 and qt4 installed on Debian, you can run
update-alternatives --config qmake (uic, moc,...) to set the default
for /usr/bin/qmake.
So checking for qmake-qt4 should actually not be necessary at all.

Hope that clears things a bit.
Michael

> Alexander also provided the following suggestion: "consider adjusting PATH or
> specifying QT4_QMAKE_EXECUTABLE directly." Adjusting PATH is not an option
> because both qmake and qmake-qt4 live in /usr/bin on my system (Debian). I
> tried specifying QT4_QMAKE_EXECUTABLE directly, but cmake forgets the value
> when it is re-run automatically (for example, when you modify a .cmake).
>
> If no reply is made to this message, I will assume that my point will have
> been made and accepted, and I will revert r549218.
>


More information about the Kde-buildsystem mailing list