[CMake] [PATCH] improvement for FindQt4.cmake
William A. Hoffman
billlist at nycap.rr.com
Tue Jan 3 17:02:00 EST 2006
At 04:51 PM 1/3/2006, Alexander Neundorf wrote:
>>
>Hmm, actually I would have expected that if I have a tool which searches
>for Qt stuff that it would at first look at QTDIR, and then at other
>options, since QTDIR is there for exactly this purpose, specifying where
>Qt is installed.
>
>Alex
Well, that maybe for QT, but the problem is for the FIND_PROGRAM
in cmake we had to pick one, and most of the time you want the
one in the path. However, it would seem that if I was going to
develop a QT program, and I set my QTDIR, then I went to bulild
something with qmake, and I typed qmake, and I got the 3.0 qmake
which would not work.
So, for FindQT we could do something like this:
FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake PATHS
$ENV{QTDIR}/bin
NO_SYSTEM_PATH
)
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}
)
-Bill
More information about the CMake
mailing list