[CMake] [PATCH] improvement for FindQt4.cmake

Alexander Neundorf a.neundorf-work at gmx.net
Tue Jan 3 16:09:27 EST 2006


Hi, 
 
FindQt4 as in cvs has some minor problems. 
If used with FIND_PACKAGE(Qt4) it doesn't honour the Qt4_FIND_REQUIRED 
and Qt4_FIND_QUIETLY variables. Additionally it didn't fail with an error 
if qmake wasn't found but REQUIRED was set. 
The attached patch fixes this. 
 
Is it intentional that FIND_PROGRAM() at first searches the system paths 
and only afterwards the additional paths are checked ? 
This had here the effect that /usr/bin/qmake was found (which is Qt 3) 
instead of /usr/lib/qt4/bin/qmake, although QTDIR wa set correctly 
to /usr/lib/qt4. That's the code in FindQt4.cmake: 
 
FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake PATHS

"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\4.0.0;InstallDir]/bin"

"[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\4.0.0;InstallDir]/bin" 
  $ENV{QTDIR}/bin 
  ${QT4_PATHS} 
) 
 
I'd also like to add some more messages so that in case of success the 
developer knows which Qt and which tools have been found. Should I add a 
message for every lib/dir/tool ? Would be a bit much I think. 
 
Alex 
 

-- 
Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten, ohne Risiko!
Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FindQtX.patch
Type: text/x-diff
Size: 3907 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/cmake/attachments/20060103/71da42ab/FindQtX.bin


More information about the CMake mailing list