summaryrefslogtreecommitdiffstats
path: root/Modules/FindQt3.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/FindQt3.cmake')
-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..*")