[CMake] Problem selecting Qt3 or Qt4

William A. Hoffman billlist at nycap.rr.com
Tue Oct 10 09:22:53 EDT 2006


At 05:57 AM 10/10/2006, John Biddiscombe wrote:
>Matthieu
>
>If you have qt3 and qt4 that is not in your path, it should all work if you do the following
>run ccmake, it will detect qt3, now set desired qt to 4, run ccmake again. some errors no doubt. Force cmake's qmake setting to point to /my/path/of/stuff/qt-4.x.0/bin/qmake, now delete all other cmake QT_XXX settings in the gui (note that this is so much harder in the windows gui because you have to do them one by one and scroll after each click, thus taking ages, in the text based unix/linux one, hitting d,d,d,d,d,d,d is enough and much nicer <hint, hint>), now reconfigure and as long as the qmake setting is correct, all the other setting should be picked up and everything will work. honest.

or

mkdir build
cd build
ccmake -DQT_QMAKE_EXECUTABLE=/my/path/of/stuff/qt-4.x.0/bin/qmake-qt4 ../path/to/source


It is best to get the QT_QMAKE_EXECUTABLE right the first time, and not delete
the variables it found.  

Or you can try the cvs FindQt4.cmake that should be able to work with qmake and qmake-qt4
in the PATH.


-Bill



More information about the CMake mailing list