[CMake] Qt find package location
A. Maitland Bottoms
bottoms at debian.org
Thu Mar 12 17:08:15 EDT 2009
Alexander Neundorf writes:
> So, if QT_QT_LIBRARY is set (which exists only for Qt3, but not for Qt4), it
> stops, because you should not use both within one project.
> If you want to work around this, unset QT_QT_LIBRARY.
Exactly!
The setting of QT_QMAKE_EXECUTABLE is not idempotent.
It seems that one can
cmake .. -DQT_INCLUDE_DIR=/usr/include/qt3 -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt3 -UQT_QT_LIBRARY ...etc...
to perform a qt3 build and then
cmake .. -DDESIRED_QT_VERSION=4 -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4 -UQT_QT_LIBRARY ...etc...
to perform a qt4 build on a system that has both qt3 and qt4 environments available.
The -UQT_QT_LIBRARY is a no-op for the Qt3 build, but necessary for the Qt4 case.
It seems that -DDESIRED_QT_VERSION=4 -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4 are necessary for Qt4.
For Qt3, -DQT_INCLUDE_DIR=/usr/include/qt3 -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt3
This finding is for cmake 2.6.3 on Debian systems with both Qt3 and Qt4 libraries available.
-Maitland
More information about the CMake
mailing list