summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2008-10-15 22:05:07 (GMT)
committerClinton Stimpson <clinton@elemtech.com>2008-10-15 22:05:07 (GMT)
commitb82eb2b9b30be75bb7815d8773ae1481733d4cc5 (patch)
tree404ddec8860775c15121bf3a39402332d00dd1aa /Modules
parent96262d167be0e3ed311c17c7d9bd6956a96a85bd (diff)
downloadCMake-b82eb2b9b30be75bb7815d8773ae1481733d4cc5.zip
CMake-b82eb2b9b30be75bb7815d8773ae1481733d4cc5.tar.gz
CMake-b82eb2b9b30be75bb7815d8773ae1481733d4cc5.tar.bz2
ENH: better way to find uic and moc.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindQt4.cmake37
1 files changed, 14 insertions, 23 deletions
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index 0ecdf49..f55772f 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -738,30 +738,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_MOC_EXECUTABLE NOTFOUND)
+ SET(QT_UIC_EXECUTABLE NOTFOUND)
SET(QT_UIC3_EXECUTABLE NOTFOUND)
SET(QT_RCC_EXECUTABLE NOTFOUND)
SET(QT_DBUSCPP2XML_EXECUTABLE NOTFOUND)
@@ -769,6 +748,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
+ 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