diff options
author | Clinton Stimpson <clinton@elemtech.com> | 2008-11-25 21:56:44 (GMT) |
---|---|---|
committer | Clinton Stimpson <clinton@elemtech.com> | 2008-11-25 21:56:44 (GMT) |
commit | 25eeb3c47c400d274110fe5a2216fb157166d778 (patch) | |
tree | c8d7f02f27bc69821ab9a229a65adf93b28deb41 | |
parent | 0e03bd1ab4789081050761342d5fdf4aa9cf0824 (diff) | |
download | CMake-25eeb3c47c400d274110fe5a2216fb157166d778.zip CMake-25eeb3c47c400d274110fe5a2216fb157166d778.tar.gz CMake-25eeb3c47c400d274110fe5a2216fb157166d778.tar.bz2 |
BUG: Revert 1.138.
-rw-r--r-- | Modules/FindQt4.cmake | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake index 10b8a03..fbfe80a 100644 --- a/Modules/FindQt4.cmake +++ b/Modules/FindQt4.cmake @@ -752,9 +752,30 @@ IF (QT4_QMAKE_FOUND) ####################################### + # find moc and uic using qmake + QT_QUERY_QMAKE(QT_MOC_EXECUTABLE_INTERNAL "QMAKE_MOC") + QT_QUERY_QMAKE(QT_UIC_EXECUTABLE_INTERNAL "QMAKE_UIC") + + # make sure we have / and not \ as qmake gives on windows + FILE(TO_CMAKE_PATH + "${QT_MOC_EXECUTABLE_INTERNAL}" QT_MOC_EXECUTABLE_INTERNAL) + # make sure we have / and not \ as qmake gives on windows + FILE(TO_CMAKE_PATH + "${QT_UIC_EXECUTABLE_INTERNAL}" QT_UIC_EXECUTABLE_INTERNAL) + + IF(QT_QMAKE_CHANGED) + SET(QT_MOC_EXECUTABLE + ${QT_MOC_EXECUTABLE_INTERNAL} CACHE FILEPATH "The moc executable" FORCE) + SET(QT_UIC_EXECUTABLE + ${QT_UIC_EXECUTABLE_INTERNAL} CACHE FILEPATH "The uic executable" FORCE) + ELSE(QT_QMAKE_CHANGED) + SET(QT_MOC_EXECUTABLE + ${QT_MOC_EXECUTABLE_INTERNAL} CACHE FILEPATH "The moc executable") + SET(QT_UIC_EXECUTABLE + ${QT_UIC_EXECUTABLE_INTERNAL} CACHE FILEPATH "The uic executable") + ENDIF(QT_QMAKE_CHANGED) + IF(QT_QMAKE_CHANGED) - SET(QT_MOC_EXECUTABLE NOTFOUND) - SET(QT_UIC_EXECUTABLE NOTFOUND) SET(QT_UIC3_EXECUTABLE NOTFOUND) SET(QT_RCC_EXECUTABLE NOTFOUND) SET(QT_DBUSCPP2XML_EXECUTABLE NOTFOUND) @@ -762,18 +783,6 @@ IF (QT4_QMAKE_FOUND) SET(QT_LUPDATE_EXECUTABLE NOTFOUND) SET(QT_LRELEASE_EXECUTABLE NOTFOUND) ENDIF(QT_QMAKE_CHANGED) - - FIND_PROGRAM(QT_MOC_EXECUTABLE - NAMES moc - PATHS ${QT_BINARY_DIR} - NO_DEFAULT_PATH - ) - - FIND_PROGRAM(QT_UIC_EXECUTABLE - NAMES uic - PATHS ${QT_BINARY_DIR} - NO_DEFAULT_PATH - ) FIND_PROGRAM(QT_UIC3_EXECUTABLE NAMES uic3 |