FindQt4: Fix handling of QT_VERSION_MAJOR mismatch

Fix capitalization of Qt4_FOUND variable when setting it to false in
this case.  This caused find_package(Qt4) to appear successful when it
was not.  Note that the legacy QT4_FOUND variable is unconditionally
overwritten at the end of the file with the value of Qt4_FOUND.
This commit is contained in:
Daniel Scharrer 2014-12-09 15:40:45 +01:00 committed by Brad King
parent 95655dc730
commit 009c1865dc
1 changed files with 1 additions and 1 deletions

View File

@ -1321,7 +1321,7 @@ endif()
if (NOT QT_VERSION_MAJOR EQUAL 4)
set(VERSION_MSG "Found unsuitable Qt version \"${QTVERSION}\" from ${QT_QMAKE_EXECUTABLE}")
set(QT4_FOUND FALSE)
set(Qt4_FOUND FALSE)
if(Qt4_FIND_REQUIRED)
message( FATAL_ERROR "${VERSION_MSG}, this code requires Qt 4.x")
else()