diff options
author | Brad King <brad.king@kitware.com> | 2014-02-04 18:34:54 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-02-04 18:34:54 (GMT) |
commit | f748b59e2057d73a25448378442d70b420ed7698 (patch) | |
tree | 0035234f8941db728f48c6485da9e5575aa34fbc /Modules/FindQt4.cmake | |
parent | 01a41bc98ca8f2451e69fde4ac513b57276809ff (diff) | |
parent | 6053ce22f69f58c9dc4db66dbfe62cdd8fbe2774 (diff) | |
download | CMake-f748b59e2057d73a25448378442d70b420ed7698.zip CMake-f748b59e2057d73a25448378442d70b420ed7698.tar.gz CMake-f748b59e2057d73a25448378442d70b420ed7698.tar.bz2 |
Merge topic 'fix-Qt-autogen'
6053ce22 QtAutogen: Make uic work even when the source is in a subdir.
1fc9ecfa FindQt4: Make AUTOMOC work regardless which order Qt 4/5 is found.
Diffstat (limited to 'Modules/FindQt4.cmake')
-rw-r--r-- | Modules/FindQt4.cmake | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake index 21a853d..9ea77d4 100644 --- a/Modules/FindQt4.cmake +++ b/Modules/FindQt4.cmake @@ -518,6 +518,14 @@ _qt4_find_qmake("${_QT4_QMAKE_NAMES}" QT_QMAKE_EXECUTABLE QTVERSION) if (QT_QMAKE_EXECUTABLE AND QTVERSION) + if (Qt5Core_FOUND) + # Qt5CoreConfig sets QT_MOC_EXECUTABLE as a non-cache variable to the Qt 5 + # path to moc. Unset that variable when Qt 4 and 5 are used together, so + # that when find_program looks for moc, it is not set to the Qt 5 version. + # If FindQt4 has already put the Qt 4 path in the cache, the unset() + # command 'unhides' the (correct) cache variable. + unset(QT_MOC_EXECUTABLE) + endif() if (QT_QMAKE_EXECUTABLE_LAST) string(COMPARE NOTEQUAL "${QT_QMAKE_EXECUTABLE_LAST}" "${QT_QMAKE_EXECUTABLE}" QT_QMAKE_CHANGED) endif() |