FindQt3: fix warning when Qt3 is not found

-- Could NOT find Qt3 (missing:  QT_QT_LIBRARY QT_INCLUDE_DIR QT_MOC_EXECUTABLE)
CreateProcess failed QT_MOC_EXECUTABLE-NOTFOUND -v
CreateProcess failed QT_UIC_EXECUTABLE-NOTFOUND -version
This commit is contained in:
Rolf Eike Beer 2012-03-02 16:55:17 +01:00
parent 65dfe9e5be
commit 2cd898d54b
1 changed files with 10 additions and 2 deletions

View File

@ -296,8 +296,16 @@ IF(QT_FOUND)
ENDIF(QT_QT_LIBRARY MATCHES "qt-mt")
ENDIF(QT_FOUND)
EXEC_PROGRAM(${QT_MOC_EXECUTABLE} ARGS "-v" OUTPUT_VARIABLE QTVERSION_MOC)
EXEC_PROGRAM(${QT_UIC_EXECUTABLE} ARGS "-version" OUTPUT_VARIABLE QTVERSION_UIC)
IF(QT_MOC_EXECUTABLE)
EXECUTE_PROCESS(COMMAND ${QT_MOC_EXECUTABLE} "-v"
OUTPUT_VARIABLE QTVERSION_MOC
ERROR_QUIET)
ENDIF(QT_MOC_EXECUTABLE)
IF(QT_UIC_EXECUTABLE)
EXECUTE_PROCESS(COMMAND ${QT_UIC_EXECUTABLE} "-version"
OUTPUT_VARIABLE QTVERSION_UIC
ERROR_QUIET)
ENDIF(QT_UIC_EXECUTABLE)
SET(_QT_UIC_VERSION_3 FALSE)
IF("${QTVERSION_UIC}" MATCHES ".* 3..*")