From 567d4d8dc62f15b7e7c90cc72cc034aab2cd66af Mon Sep 17 00:00:00 2001 From: Nils Gladitz Date: Wed, 25 Jun 2014 15:57:27 +0200 Subject: [PATCH] FindQt4: Don't further process qmake if it does not belong to Qt4 If the only qmake that can be found belongs to Qt5 the find module would otherwise still further interrogate it and issue diagnostics which are specific to Qt4. --- Modules/FindQt4.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake index c930042f3..c942c1c5a 100644 --- a/Modules/FindQt4.cmake +++ b/Modules/FindQt4.cmake @@ -518,7 +518,8 @@ set(QT4_INSTALLED_VERSION_TOO_OLD FALSE) set(_QT4_QMAKE_NAMES qmake qmake4 qmake-qt4 qmake-mac) _qt4_find_qmake("${_QT4_QMAKE_NAMES}" QT_QMAKE_EXECUTABLE QTVERSION) -if (QT_QMAKE_EXECUTABLE AND QTVERSION) +if (QT_QMAKE_EXECUTABLE AND + QTVERSION VERSION_GREATER 3 AND QTVERSION VERSION_LESS 5) if (Qt5Core_FOUND) # Qt5CoreConfig sets QT_MOC_EXECUTABLE as a non-cache variable to the Qt 5