[cmake-developers] [PATCH] FindQt4: Fix handling of QT_VERSION_MAJOR mismatch
Daniel Scharrer
daniel at constexpr.org
Tue Dec 9 09:40:45 EST 2014
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.
---
Modules/FindQt4.cmake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index a79246a..11091b5 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -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()
--
2.2.0
More information about the cmake-developers
mailing list