diff options
Diffstat (limited to 'Modules/FindQt3.cmake')
-rw-r--r-- | Modules/FindQt3.cmake | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/Modules/FindQt3.cmake b/Modules/FindQt3.cmake index ba0a7c0..7d5b8d0 100644 --- a/Modules/FindQt3.cmake +++ b/Modules/FindQt3.cmake @@ -280,17 +280,33 @@ 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_UI) +SET(_QT_UIC_VERSION_3 FALSE) +IF("${QTVERSION_UIC}" MATCHES ".* 3..*") + SET(_QT_UIC_VERSION_3 TRUE) +ENDIF("${QTVERSION_UIC}" MATCHES ".* 3..*") + +SET(_QT_MOC_VERSION_3 FALSE) +IF("${QTVERSION_MOC}" MATCHES ".* 3..*") + SET(_QT_MOC_VERSION_3 TRUE) +ENDIF("${QTVERSION_MOC}" MATCHES ".* 3..*") + +SET(QT_WRAP_CPP FALSE) IF (QT_MOC_EXECUTABLE) - SET ( QT_WRAP_CPP "YES") + IF(_QT_MOC_VERSION_3) + SET ( QT_WRAP_CPP TRUE) + ENDIF(_QT_MOC_VERSION_3) ENDIF (QT_MOC_EXECUTABLE) +SET(QT_WRAP_UI FALSE) IF (QT_UIC_EXECUTABLE) - SET ( QT_WRAP_UI "YES") + IF(_QT_UIC_VERSION_3) + SET ( QT_WRAP_UI TRUE) + ENDIF(_QT_UIC_VERSION_3) ENDIF (QT_UIC_EXECUTABLE) - - MARK_AS_ADVANCED( QT_INCLUDE_DIR QT_QT_LIBRARY |