diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2006-01-09 17:45:37 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2006-01-09 17:45:37 (GMT) |
commit | 19e566d3952c19845705587cc1a217b13ef76f09 (patch) | |
tree | 9724b8ef2fc2cc4f7fcd70924af2fcf12a64ee17 /Modules | |
parent | 0c302a7e5fa1b52b6b59a0f299dd811a9a1194c7 (diff) | |
download | CMake-19e566d3952c19845705587cc1a217b13ef76f09.zip CMake-19e566d3952c19845705587cc1a217b13ef76f09.tar.gz CMake-19e566d3952c19845705587cc1a217b13ef76f09.tar.bz2 |
ENH: add qt quiet stuff
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindQt.cmake | 4 | ||||
-rw-r--r-- | Modules/FindQt4.cmake | 19 |
2 files changed, 16 insertions, 7 deletions
diff --git a/Modules/FindQt.cmake b/Modules/FindQt.cmake index 4bc8fff..2bcad8b 100644 --- a/Modules/FindQt.cmake +++ b/Modules/FindQt.cmake @@ -115,9 +115,13 @@ ELSE(QT3_INSTALLED AND QT4_INSTALLED ) ENDIF(QT3_INSTALLED AND QT4_INSTALLED ) IF(DESIRED_QT_VERSION MATCHES 3) + SET(Qt3_FIND_REQUIRED ${Qt_FIND_REQUIRED}) + SET(Qt3_FIND_QUIETLY ${Qt_FIND_QUIETLY}) INCLUDE(FindQt3) ENDIF(DESIRED_QT_VERSION MATCHES 3) IF(DESIRED_QT_VERSION MATCHES 4) + SET(Qt4_FIND_REQUIRED ${Qt_FIND_REQUIRED}) + SET(Qt4_FIND_QUIETLY ${Qt_FIND_QUIETLY}) INCLUDE(FindQt4) ENDIF(DESIRED_QT_VERSION MATCHES 4) diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake index 655c733..9145d6b 100644 --- a/Modules/FindQt4.cmake +++ b/Modules/FindQt4.cmake @@ -132,6 +132,7 @@ FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake PATHS $ENV{QTDIR}/bin ${QT4_PATHS} ) + IF(QT_QMAKE_EXECUTABLE) EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE} ARGS "-query QT_VERSION" OUTPUT_VARIABLE QTVERSION) @@ -139,6 +140,7 @@ IF(QT_QMAKE_EXECUTABLE) SET(QT4_QMAKE_FOUND TRUE) ENDIF(QTVERSION MATCHES "4.*") ENDIF(QT_QMAKE_EXECUTABLE) + IF(QT4_QMAKE_FOUND) # Set QT_LIBRARY_DIR IF(NOT QT_LIBRARY_DIR) @@ -207,9 +209,9 @@ IF(QT4_QMAKE_FOUND) ENDIF (QT_USE_FRAMEWORKS) ENDIF( QT_QT_INCLUDE_DIR AND NOT QT_INCLUDE_DIR) IF( NOT QT_INCLUDE_DIR) - IF( NOT Qt_FIND_QUIETLY AND Qt_FIND_REQUIRED) + IF( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED) MESSAGE( SEND_ERROR "Could not find qglobal.h") - ENDIF( NOT Qt_FIND_QUIETLY AND Qt_FIND_REQUIRED) + ENDIF( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED) ENDIF( NOT QT_INCLUDE_DIR) IF (QT_USE_FRAMEWORKS) @@ -686,20 +688,20 @@ IF(QT4_QMAKE_FOUND) ###################################### # - # deside if Qt got found + # decide if Qt got found # ###################################### # if the includes,libraries,moc,uic and rcc are found then we have it IF( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND QT_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE) SET( QT4_FOUND "YES" ) - IF( NOT Qt_FIND_QUIETLY) + IF( NOT Qt4_FIND_QUIETLY) MESSAGE(STATUS "Found Qt-Version ${QT_INST_MAJOR_VERSION}.${QT_INST_MINOR_VERSION}.${QT_INST_PATCH_VERSION}") - ENDIF( NOT Qt_FIND_QUIETLY) + 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") - IF( Qt_FIND_REQUIRED) + IF( Qt4_FIND_REQUIRED) MESSAGE( SEND_ERROR "Qt libraries, includes, moc, uic or/and rcc NOT found!") - ENDIF( Qt_FIND_REQUIRED) + 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}) @@ -730,5 +732,8 @@ ELSE(QT4_QMAKE_FOUND) IF(QT_QMAKE_EXECUTABLE) MESSAGE("QT_QMAKE_EXECUTABLE set to qmake version: QTVERSION = ${QTVERSION}\nQT_QMAKE_EXECUTABLE = ${QT_QMAKE_EXECUTABLE}, please set to path to qmake from qt4.") ENDIF(QT_QMAKE_EXECUTABLE) + IF( Qt4_FIND_REQUIRED) + MESSAGE( SEND_ERROR "Qt qmake not found!") + ENDIF( Qt4_FIND_REQUIRED) ENDIF(QT4_QMAKE_FOUND) |