Hi, On Thu, Sep 5, 2013 at 11:30 AM, Joseph W. Joshua <jos...@megvel.me.ke>wrote:
> Hi all, > > When using cmake, how can one detect whether the Qt version in use is > greater that Qt4? In qmake, for example, I can determine whether the Qt > version is greater than Qt4 by using : > > greaterThan(QT_MAJOR_VERSION, 4)xxx > If you use find_package(Qt) you can find out wether Qt3 or Qt4 was found with the variables QT4_INSTALLED and QT3_INSTALLED as documented in the manual. For Qt5 you'd have to use find_package(Qt5) anyway as thats not covered by the FindQt.cmake module yet. In addition, the if-command has operators to compare version numbers (VERSION_*), see http://cmake.org/cmake/help/v2.8.11/cmake.html#command:if for more details. Andreas
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest