Joseph W. Joshua 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 > > Anyone know how to do this in cmake?
if(QT_VERSION_MAJOR EQUAL 4) # Qt4 code endif() Note though that it is possible to have both Qt 4 and Qt 5 in use in the same project: http://cmake.org/gitweb?p=cmake.git;a=blob;f=Tests/Qt4And5Automoc/CMakeLists.txt;h=0cc80fe73ff1d40433d0980358d3851a9a5065c8;hb=HEAD Thanks, Steve. _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest