diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2005-07-20 16:48:12 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2005-07-20 16:48:12 (GMT) |
commit | 380f8f6b4b6bd1d775d17a8fbeb1205fc300ce92 (patch) | |
tree | 80656cc8c55f40405c8ec766cba30b9b299780fa /Modules/FindQt.cmake | |
parent | 712e64ebb302d3332fb8c0770f71bcae30a24a8a (diff) | |
download | CMake-380f8f6b4b6bd1d775d17a8fbeb1205fc300ce92.zip CMake-380f8f6b4b6bd1d775d17a8fbeb1205fc300ce92.tar.gz CMake-380f8f6b4b6bd1d775d17a8fbeb1205fc300ce92.tar.bz2 |
ENH: make sure qmake is on the machine before running it
Diffstat (limited to 'Modules/FindQt.cmake')
-rw-r--r-- | Modules/FindQt.cmake | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Modules/FindQt.cmake b/Modules/FindQt.cmake index 1c5dbaa..cb4bd67 100644 --- a/Modules/FindQt.cmake +++ b/Modules/FindQt.cmake @@ -23,6 +23,7 @@ IF(NOT QT_FOUND) ENDIF(NOT QT_FOUND) # if a project needs Qt it has to call FoundQt.cmake and NOT FoundQt3.cmake, FoundQt4.cmake etc. This gets checked in FoundQt4.cmake etc. SET(FOUNDQT_CALLED "YES") +FIND_PROGRAM(QT_QMAKE qmake) # compatibility to CMakeList.txt files for Qt3 projects IF(NOT QT_MAX_VERSION) @@ -39,10 +40,12 @@ ENDIF(NOT QT_MIN_VERSION) # QT_GLOBAL_H_FILE # ####################################### -IF( NOT QT_QGLOBAL_H_FILE) - EXEC_PROGRAM( qmake - ARGS "-query QT_INSTALL_HEADERS" - OUTPUT_VARIABLE qt_headers ) +IF( NOT QT_QGLOBAL_H_FILE) + IF(QT_QMAKE) + EXEC_PROGRAM( qmake + ARGS "-query QT_INSTALL_HEADERS" + OUTPUT_VARIABLE qt_headers ) + ENDIF(QT_QMAKE) # Qt4-like search paths FIND_FILE( QT4_QGLOBAL_H_FILE qglobal.h |