summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2014-05-20 15:47:54 (GMT)
committerBrad King <brad.king@kitware.com>2014-05-22 12:56:05 (GMT)
commit0645eedb7150aa28f52161abc3f8ef2256aafb54 (patch)
tree04212b25d119fc8e16d9da435dcdfd8bb086949f /Modules
parent2d5e3d2d2bfd79311c40db173d13f6d0cfb10019 (diff)
downloadCMake-0645eedb7150aa28f52161abc3f8ef2256aafb54.zip
CMake-0645eedb7150aa28f52161abc3f8ef2256aafb54.tar.gz
CMake-0645eedb7150aa28f52161abc3f8ef2256aafb54.tar.bz2
FindQt[34]: Prefer matching versioned tool names
After finding qmake we search in QT_BINARY_DIR for the other Qt tools. Try all versioned executable names before trying the plain executable name. This makes it much more likely that if 2 different major versions are installed in the same prefix CMake will be able to detect a proper set of tools.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindQt3.cmake4
-rw-r--r--Modules/FindQt4.cmake12
2 files changed, 8 insertions, 8 deletions
diff --git a/Modules/FindQt3.cmake b/Modules/FindQt3.cmake
index 4fc6829..86997ba 100644
--- a/Modules/FindQt3.cmake
+++ b/Modules/FindQt3.cmake
@@ -161,7 +161,7 @@ find_library(QT_QASSISTANTCLIENT_LIBRARY
# Qt 3 should prefer QTDIR over the PATH
find_program(QT_MOC_EXECUTABLE
- NAMES moc-qt3 moc moc3 moc3-mt
+ NAMES moc-qt3 moc3 moc3-mt moc
HINTS
ENV QTDIR
PATHS
@@ -186,7 +186,7 @@ endif()
# Qt 3 should prefer QTDIR over the PATH
find_program(QT_UIC_EXECUTABLE
- NAMES uic-qt3 uic uic3 uic3-mt
+ NAMES uic-qt3 uic3 uic3-mt uic
HINTS
ENV QTDIR
PATHS
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index e44d1d9..9487a62 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -1137,17 +1137,17 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
endif()
endmacro()
- _find_qt4_program(QT_MOC_EXECUTABLE Qt4::moc moc-qt4 moc moc4)
- _find_qt4_program(QT_UIC_EXECUTABLE Qt4::uic uic-qt4 uic uic4)
+ _find_qt4_program(QT_MOC_EXECUTABLE Qt4::moc moc-qt4 moc4 moc)
+ _find_qt4_program(QT_UIC_EXECUTABLE Qt4::uic uic-qt4 uic4 uic)
_find_qt4_program(QT_UIC3_EXECUTABLE Qt4::uic3 uic3)
_find_qt4_program(QT_RCC_EXECUTABLE Qt4::rcc rcc)
_find_qt4_program(QT_DBUSCPP2XML_EXECUTABLE Qt4::qdbuscpp2xml qdbuscpp2xml)
_find_qt4_program(QT_DBUSXML2CPP_EXECUTABLE Qt4::qdbusxml2cpp qdbusxml2cpp)
- _find_qt4_program(QT_LUPDATE_EXECUTABLE Qt4::lupdate lupdate-qt4 lupdate lupdate4)
- _find_qt4_program(QT_LRELEASE_EXECUTABLE Qt4::lrelease lrelease-qt4 lrelease lrelease4)
+ _find_qt4_program(QT_LUPDATE_EXECUTABLE Qt4::lupdate lupdate-qt4 lupdate4 lupdate)
+ _find_qt4_program(QT_LRELEASE_EXECUTABLE Qt4::lrelease lrelease-qt4 lrelease4 lrelease)
_find_qt4_program(QT_QCOLLECTIONGENERATOR_EXECUTABLE Qt4::qcollectiongenerator qcollectiongenerator-qt4 qcollectiongenerator)
- _find_qt4_program(QT_DESIGNER_EXECUTABLE Qt4::designer designer-qt4 designer designer4)
- _find_qt4_program(QT_LINGUIST_EXECUTABLE Qt4::linguist linguist-qt4 linguist linguist4)
+ _find_qt4_program(QT_DESIGNER_EXECUTABLE Qt4::designer designer-qt4 designer4 designer)
+ _find_qt4_program(QT_LINGUIST_EXECUTABLE Qt4::linguist linguist-qt4 linguist4 linguist)
if (NOT TARGET Qt4::qmake)
add_executable(Qt4::qmake IMPORTED)