diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindQt4.cmake | 34 |
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) |