summaryrefslogtreecommitdiffstats
path: root/Modules/FindQt3.cmake
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2006-11-22 18:30:59 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2006-11-22 18:30:59 (GMT)
commit651fecee5bb9011ac6402479b2c38c150799f6ee (patch)
tree699c924087588b772a72d2d354a63fb092f67e35 /Modules/FindQt3.cmake
parent445ff045281fcb7d38f9ed30782fe49f04f5fe90 (diff)
downloadCMake-651fecee5bb9011ac6402479b2c38c150799f6ee.zip
CMake-651fecee5bb9011ac6402479b2c38c150799f6ee.tar.gz
CMake-651fecee5bb9011ac6402479b2c38c150799f6ee.tar.bz2
ENH: make sure findqt3 finds qt3 and not qt4
Diffstat (limited to 'Modules/FindQt3.cmake')
-rw-r--r--Modules/FindQt3.cmake24
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