summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2012-03-02 15:55:17 (GMT)
committerRolf Eike Beer <eike@sf-mail.de>2012-03-02 16:02:03 (GMT)
commit2cd898d54b7068d78d719ad23131707b300624a7 (patch)
tree922ea2fa436041598c89173461f7b66a4e072784
parent65dfe9e5bebae6dd7b9d1d43f0d3075ee55de198 (diff)
downloadCMake-2cd898d54b7068d78d719ad23131707b300624a7.zip
CMake-2cd898d54b7068d78d719ad23131707b300624a7.tar.gz
CMake-2cd898d54b7068d78d719ad23131707b300624a7.tar.bz2
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
-rw-r--r--Modules/FindQt3.cmake12
1 files changed, 10 insertions, 2 deletions
diff --git a/Modules/FindQt3.cmake b/Modules/FindQt3.cmake
index 86236cc..69d2f65 100644
--- a/Modules/FindQt3.cmake
+++ b/Modules/FindQt3.cmake
@@ -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..*")