ENH: add qt quiet stuff

This commit is contained in:
Bill Hoffman 2006-01-09 12:45:37 -05:00
parent 0c302a7e5f
commit 19e566d395
2 changed files with 16 additions and 7 deletions

View File

@ -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)

View File

@ -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)