diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2005-08-10 12:48:03 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2005-08-10 12:48:03 (GMT) |
commit | df37d871c4d686a3b6aa1a4e4abbb630cd0d7d57 (patch) | |
tree | 3b04e94bf8c29fea6b88515ab6dda972c887ca99 /Modules/FindQt.cmake | |
parent | 8a52a910e1ac45d16011e755ed7e5ca294c84372 (diff) | |
download | CMake-df37d871c4d686a3b6aa1a4e4abbb630cd0d7d57.zip CMake-df37d871c4d686a3b6aa1a4e4abbb630cd0d7d57.tar.gz CMake-df37d871c4d686a3b6aa1a4e4abbb630cd0d7d57.tar.bz2 |
ENH: fixed up qt stuff from Clinton Stimpson
Diffstat (limited to 'Modules/FindQt.cmake')
-rw-r--r-- | Modules/FindQt.cmake | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Modules/FindQt.cmake b/Modules/FindQt.cmake index 2c17200..b251939 100644 --- a/Modules/FindQt.cmake +++ b/Modules/FindQt.cmake @@ -21,9 +21,11 @@ IF(NOT QT_FOUND) SET(QT_FOUND "NO") 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) + +# check for qmake +IF(NOT QT_QMAKE_EXECUTABLE) + FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake PATHS $ENV{QTDIR}/bin) +ENDIF(NOT QT_QMAKE_EXECUTABLE) # compatibility to CMakeList.txt files for Qt3 projects IF(NOT QT_MAX_VERSION) @@ -41,12 +43,12 @@ ENDIF(NOT QT_MIN_VERSION) # ####################################### IF( NOT QT_QGLOBAL_H_FILE) - IF(QT_QMAKE) - EXEC_PROGRAM( qmake + IF(QT_QMAKE_EXECUTABLE) + EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE} ARGS "-query QT_INSTALL_HEADERS" OUTPUT_VARIABLE qt_headers ) - ENDIF(QT_QMAKE) - + ENDIF(QT_QMAKE_EXECUTABLE) + # Qt4-like search paths FIND_FILE( QT4_QGLOBAL_H_FILE qglobal.h ${qt_headers}/Qt @@ -284,7 +286,5 @@ IF(QT_VERSION_SMALL_ENOUGH AND QT_VERSION_BIG_ENOUGH) ENDIF(QT_VERSION_SMALL_ENOUGH AND QT_VERSION_BIG_ENOUGH) +MARK_AS_ADVANCED(QT4_QGLOBAL_H_FILE QT3_QGLOBAL_H_FILE QT_QMAKE_EXECUTABLE) - - -MARK_AS_ADVANCED(QT4_QGLOBAL_H_FILE QT3_QGLOBAL_H_FILE QT_QMAKE) |