diff options
author | Clinton Stimpson <clinton@elemtech.com> | 2009-02-13 23:52:02 (GMT) |
---|---|---|
committer | Clinton Stimpson <clinton@elemtech.com> | 2009-02-13 23:52:02 (GMT) |
commit | 2b4a472e81453df1e722549caf2993d8c54156e8 (patch) | |
tree | 5f701f5286fb6252fa2c5ef6079844ee7562ebef /Modules | |
parent | a3790d258b516becc1baccd5440a7c876349db22 (diff) | |
download | CMake-2b4a472e81453df1e722549caf2993d8c54156e8.zip CMake-2b4a472e81453df1e722549caf2993d8c54156e8.tar.gz CMake-2b4a472e81453df1e722549caf2993d8c54156e8.tar.bz2 |
ENH: Allowing finding a relocated Qt installation which contains a qt.conf to override the hardcoded paths in qmake.
Fixes #8532.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindQt4.cmake | 37 |
1 files changed, 14 insertions, 23 deletions
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake index 7b79efd..bfb9187 100644 --- a/Modules/FindQt4.cmake +++ b/Modules/FindQt4.cmake @@ -798,30 +798,9 @@ 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_UIC_EXECUTABLE NOTFOUND) + SET(QT_MOC_EXECUTABLE NOTFOUND) SET(QT_UIC3_EXECUTABLE NOTFOUND) SET(QT_RCC_EXECUTABLE NOTFOUND) SET(QT_DBUSCPP2XML_EXECUTABLE NOTFOUND) @@ -829,6 +808,18 @@ 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-qt4 moc + PATHS ${QT_BINARY_DIR} + NO_DEFAULT_PATH + ) + + FIND_PROGRAM(QT_UIC_EXECUTABLE + NAMES uic-qt4 uic + PATHS ${QT_BINARY_DIR} + NO_DEFAULT_PATH + ) FIND_PROGRAM(QT_UIC3_EXECUTABLE NAMES uic3 |