summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-01-04 22:29:01 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2007-01-04 22:29:01 (GMT)
commit7ab81d187e5df4238f6160e34ed40ddc9de21a1a (patch)
tree9d3bd28be6c1ecbaea2d3b58c39187a273630bcb /Modules
parent41676226671cdd1c745ba2c9cf9a18f035f1154b (diff)
downloadCMake-7ab81d187e5df4238f6160e34ed40ddc9de21a1a.zip
CMake-7ab81d187e5df4238f6160e34ed40ddc9de21a1a.tar.gz
CMake-7ab81d187e5df4238f6160e34ed40ddc9de21a1a.tar.bz2
ENH: if a wrong qmake has been found, mark it as invalid in the cache, so
that it is searched again the next time cmake runs Tested in KDE since Jul 5th: http://websvn.kde.org/trunk/KDE/kdelibs/cmake/modules/FindQt4.cmake?rev=558318&view=rev Alex
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindQt4.cmake34
1 files changed, 19 insertions, 15 deletions
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index 1927894..ac25b1c 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -242,7 +242,8 @@ IF (QT_QMAKE_EXECUTABLE)
SET(QT4_QMAKE_FOUND FALSE)
EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE} ARGS "-query QT_VERSION" OUTPUT_VARIABLE QTVERSION)
- # check for qt3 qmake and then try and find qmake-qt4 in the path
+
+ # check for qt3 qmake and then try and find qmake4 or qmake-qt4 in the path
IF("${QTVERSION}" MATCHES "Unknown")
SET(QT_QMAKE_EXECUTABLE NOTFOUND CACHE FILEPATH "" FORCE)
FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake4 qmake-qt4 PATHS
@@ -1029,12 +1030,14 @@ IF (QT4_QMAKE_FOUND)
ENDIF( NOT Qt4_FIND_QUIETLY)
ELSE( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND QT_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE)
SET( QT4_FOUND "NO")
+ SET(QT_QMAKE_EXECUTABLE "${QT_QMAKE_EXECUTABLE}-NOTFOUND" CACHE FILEPATH "Invalid qmake found" FORCE)
IF( Qt4_FIND_REQUIRED)
MESSAGE( FATAL_ERROR "Qt libraries, includes, moc, uic or/and rcc NOT found!")
ENDIF( Qt4_FIND_REQUIRED)
ENDIF( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND QT_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE)
SET(QT_FOUND ${QT4_FOUND})
-
+
+
#######################################
#
# Qt configuration
@@ -1184,18 +1187,19 @@ IF (QT4_QMAKE_FOUND)
SET( QT_QT_LIBRARY "")
ELSE(QT4_QMAKE_FOUND)
-
- IF(Qt4_FIND_REQUIRED)
- IF(QT4_INSTALLED_VERSION_TOO_OLD)
- MESSAGE(FATAL_ERROR "The installed Qt version ${QTVERSION} is too old, at least version ${QT_MIN_VERSION} is required")
- ELSE(QT4_INSTALLED_VERSION_TOO_OLD)
- MESSAGE( FATAL_ERROR "Qt qmake not found!")
- ENDIF(QT4_INSTALLED_VERSION_TOO_OLD)
- ELSE(Qt4_FIND_REQUIRED)
- IF(QT4_INSTALLED_VERSION_TOO_OLD AND NOT Qt4_FIND_QUIETLY)
- MESSAGE(STATUS "The installed Qt version ${QTVERSION} is too old, at least version ${QT_MIN_VERSION} is required")
- ENDIF(QT4_INSTALLED_VERSION_TOO_OLD AND NOT Qt4_FIND_QUIETLY)
- ENDIF(Qt4_FIND_REQUIRED)
-
+
+ SET(QT_QMAKE_EXECUTABLE "${QT_QMAKE_EXECUTABLE}-NOTFOUND" CACHE FILEPATH "Invalid qmake found" FORCE)
+ IF(Qt4_FIND_REQUIRED)
+ IF(QT4_INSTALLED_VERSION_TOO_OLD)
+ MESSAGE(FATAL_ERROR "The installed Qt version ${QTVERSION} is too old, at least version ${QT_MIN_VERSION} is required")
+ ELSE(QT4_INSTALLED_VERSION_TOO_OLD)
+ MESSAGE( FATAL_ERROR "Qt qmake not found!")
+ ENDIF(QT4_INSTALLED_VERSION_TOO_OLD)
+ ELSE(Qt4_FIND_REQUIRED)
+ IF(QT4_INSTALLED_VERSION_TOO_OLD AND NOT Qt4_FIND_QUIETLY)
+ MESSAGE(STATUS "The installed Qt version ${QTVERSION} is too old, at least version ${QT_MIN_VERSION} is required")
+ ENDIF(QT4_INSTALLED_VERSION_TOO_OLD AND NOT Qt4_FIND_QUIETLY)
+ ENDIF(Qt4_FIND_REQUIRED)
+
ENDIF (QT4_QMAKE_FOUND)