[cmake-developers] Qt 4 and 5 on the same system - qmake binary name priority

Brad King brad.king at kitware.com
Mon Mar 11 11:23:31 EDT 2013


On 03/08/2013 02:52 PM, Clinton Stimpson wrote:
> Its not as simple as changing the order.
> If I have my own build of Qt4, and if FindQt4.cmake had this:
> find_program(QT_QMAKE_EXECUTABLE NAMES qmake4 qmake-qt4 qmake-mac qmake ...)
> and I try to use my build of Qt
> CMAKE_PREFIX_PATH=/home/me/qt/qt-4.7.2 cmake ../
> It finds /usr/bin/qmake-qt4 instead, because it searched for qmake-qt4 in all 
> possible paths before searching for qmake.
> 
> Currently, I think we need to keep "qmake" first.

FYI, you changed it to the current order here:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=61ad5242#patch1

but we used to have qmake last.  I think it may have flip-flopped a
few times before that too but I do not remember for sure.

> The proposed patch does improve the situation by making a separate 
> find_program() call for each executable name.  It also verifies the results of 
> each find_program().

Is the patch acceptable?  Do you have an alternative?

I'd like this to be worked out ASAP.

We're planning 2.8.11-rc1 later this week.

Thanks,
-Brad



More information about the cmake-developers mailing list