summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfigure5
-rw-r--r--mkspecs/features/dbusadaptors.prf5
-rw-r--r--mkspecs/features/dbusinterfaces.prf5
-rw-r--r--mkspecs/features/moc.prf5
-rw-r--r--mkspecs/features/qt_functions.prf11
-rw-r--r--mkspecs/features/resources.prf5
-rw-r--r--mkspecs/features/uic.prf12
-rw-r--r--mkspecs/features/win32/qaxcontainer.prf4
-rw-r--r--mkspecs/features/win32/qaxserver.prf3
-rw-r--r--tools/configure/configureapp.cpp5
-rw-r--r--translations/translations.pri6
-rw-r--r--translations/translations.pro6
12 files changed, 22 insertions, 50 deletions
diff --git a/configure b/configure
index 0cf7542..057d39a 100755
--- a/configure
+++ b/configure
@@ -7198,11 +7198,6 @@ QMAKE_ABSOLUTE_SOURCE_ROOT = \$\$QT_SOURCE_TREE
QMAKE_MOC_SRC = \$\$QT_BUILD_TREE/src/moc
#local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
-QMAKE_MOC = \$\$QT_BUILD_TREE/bin/moc
-QMAKE_UIC = \$\$QT_BUILD_TREE/bin/uic
-QMAKE_UIC3 = \$\$QT_BUILD_TREE/bin/uic3
-QMAKE_RCC = \$\$QT_BUILD_TREE/bin/rcc
-QMAKE_QDBUSXML2CPP = \$\$QT_BUILD_TREE/bin/qdbusxml2cpp
QMAKE_INCDIR_QT = \$\$QT_BUILD_TREE/include
QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib
diff --git a/mkspecs/features/dbusadaptors.prf b/mkspecs/features/dbusadaptors.prf
index 241ace6..17dffa5 100644
--- a/mkspecs/features/dbusadaptors.prf
+++ b/mkspecs/features/dbusadaptors.prf
@@ -1,7 +1,4 @@
-isEmpty(QMAKE_QDBUSXML2CPP) {
- win32:QMAKE_QDBUSXML2CPP = $$[QT_INSTALL_BINS]\qdbusxml2cpp.exe
- else:QMAKE_QDBUSXML2CPP = $$[QT_INSTALL_BINS]/qdbusxml2cpp
-}
+qtPrepareTool(QMAKE_QDBUSXML2CPP, qdbusxml2cpp)
for(DBUS_ADAPTOR, $$list($$unique(DBUS_ADAPTORS))) {
diff --git a/mkspecs/features/dbusinterfaces.prf b/mkspecs/features/dbusinterfaces.prf
index c32597a..412e80f 100644
--- a/mkspecs/features/dbusinterfaces.prf
+++ b/mkspecs/features/dbusinterfaces.prf
@@ -1,9 +1,6 @@
load(moc)
-isEmpty(QMAKE_QDBUSXML2CPP) {
- win32:QMAKE_QDBUSXML2CPP = $$[QT_INSTALL_BINS]\qdbusxml2cpp.exe
- else:QMAKE_QDBUSXML2CPP = $$[QT_INSTALL_BINS]/qdbusxml2cpp
-}
+qtPrepareTool(QMAKE_QDBUSXML2CPP, qdbusxml2cpp)
for(DBUS_INTERFACE, $$list($$unique(DBUS_INTERFACES))) {
diff --git a/mkspecs/features/moc.prf b/mkspecs/features/moc.prf
index e4b7dae..e1296ec 100644
--- a/mkspecs/features/moc.prf
+++ b/mkspecs/features/moc.prf
@@ -1,9 +1,6 @@
#global defaults
-isEmpty(QMAKE_MOC) {
- contains(QMAKE_HOST.os,Windows):QMAKE_MOC = $$[QT_INSTALL_BINS]\moc.exe
- else:QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
-}
+qtPrepareTool(QMAKE_MOC, moc)
isEmpty(MOC_DIR):MOC_DIR = .
isEmpty(QMAKE_H_MOD_MOC):QMAKE_H_MOD_MOC = moc_
isEmpty(QMAKE_EXT_CPP_MOC):QMAKE_EXT_CPP_MOC = .moc
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
index 1be6d9b..23e2616 100644
--- a/mkspecs/features/qt_functions.prf
+++ b/mkspecs/features/qt_functions.prf
@@ -78,3 +78,14 @@ defineTest(qtAddLibrary) {
export(QMAKE_LFLAGS)
return(true)
}
+
+# variable, default
+defineTest(qtPrepareTool) {
+ isEmpty($$1) {
+ !isEmpty(QT_BUILD_TREE):$$1 = $$QT_BUILD_TREE/bin/$$2
+ else:$$1 = $$[QT_INSTALL_BINS]/$$2
+ }
+ $$1 ~= s,[/\\\\],$$QMAKE_DIR_SEP,
+ contains(QMAKE_HOST.os, Windows):!contains($$1, \.exe$):$$1 = $$eval($$1).exe
+ export($$1)
+}
diff --git a/mkspecs/features/resources.prf b/mkspecs/features/resources.prf
index 8ccd576..5d00a4d 100644
--- a/mkspecs/features/resources.prf
+++ b/mkspecs/features/resources.prf
@@ -1,7 +1,4 @@
-isEmpty(QMAKE_RCC) {
- win32:QMAKE_RCC = $$[QT_INSTALL_BINS]\rcc.exe
- else:QMAKE_RCC = $$[QT_INSTALL_BINS]/rcc
-}
+qtPrepareTool(QMAKE_RCC, rcc)
isEmpty(RCC_DIR):RCC_DIR = .
isEmpty(QMAKE_RESOURCE_PREFIX):QMAKE_RESOURCE_PREFIX = /tmp/
diff --git a/mkspecs/features/uic.prf b/mkspecs/features/uic.prf
index eaf373a..d108f24 100644
--- a/mkspecs/features/uic.prf
+++ b/mkspecs/features/uic.prf
@@ -1,13 +1,5 @@
-
-isEmpty(QMAKE_UIC3) {
- contains(QMAKE_HOST.os,Windows):QMAKE_UIC3 = $$[QT_INSTALL_BINS]\uic3.exe
- else:QMAKE_UIC3 = $$[QT_INSTALL_BINS]/uic3
-}
-
-isEmpty(QMAKE_UIC) {
- contains(QMAKE_HOST.os,Windows):QMAKE_UIC = $$[QT_INSTALL_BINS]\uic.exe
- else:QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
-}
+qtPrepareTool(QMAKE_UIC3, uic3)
+qtPrepareTool(QMAKE_UIC, uic)
isEmpty(UI_DIR):UI_DIR = .
isEmpty(UI_SOURCES_DIR):UI_SOURCES_DIR = $$UI_DIR
diff --git a/mkspecs/features/win32/qaxcontainer.prf b/mkspecs/features/win32/qaxcontainer.prf
index 49edb2a..34c6dfe 100644
--- a/mkspecs/features/win32/qaxcontainer.prf
+++ b/mkspecs/features/win32/qaxcontainer.prf
@@ -8,9 +8,7 @@
LIBS += -lQAxContainer
}
-isEmpty(QMAKE_DUMPCPP) {
- win32:QMAKE_DUMPCPP = $$[QT_INSTALL_BINS]\dumpcpp.exe
-}
+qtPrepareTool(QMAKE_DUMPCPP, dumpcpp)
dumpcpp_decl.commands = $$QMAKE_DUMPCPP ${QMAKE_FILE_IN} -o ${QMAKE_FILE_BASE}
qaxcontainer_compat: dumpcpp_decl.commands += -compat
diff --git a/mkspecs/features/win32/qaxserver.prf b/mkspecs/features/win32/qaxserver.prf
index a18c421..1ff6825 100644
--- a/mkspecs/features/win32/qaxserver.prf
+++ b/mkspecs/features/win32/qaxserver.prf
@@ -14,7 +14,8 @@ equals(TEMPLATE, "vcapp"):ACTIVEQT_IDE = VisualStudio
equals(TEMPLATE, "vclib"):ACTIVEQT_IDE = VisualStudio
equals(ACTIVEQT_IDE, "VisualStudio") {
- ACTIVEQT_IDC = $${QMAKE_IDC}
+ ACTIVEQT_IDC = $${QMAKE_IDC} ### Qt5: remove me
+ qtPrepareTool(ACTIVEQT_IDC, idc)
ACTIVEQT_IDL = $${QMAKE_IDL}
ACTIVEQT_TARGET = "$(TargetPath)"
win32-msvc {
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index b35f454..7319844 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -2755,11 +2755,6 @@ void Configure::generateCachefile()
cacheStream << "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" << endl;
//so that we can build without an install first (which would be impossible)
- cacheStream << "QMAKE_MOC = $$QT_BUILD_TREE" << fixSeparators("/bin/moc.exe") << endl;
- cacheStream << "QMAKE_UIC = $$QT_BUILD_TREE" << fixSeparators("/bin/uic.exe") << endl;
- cacheStream << "QMAKE_UIC3 = $$QT_BUILD_TREE" << fixSeparators("/bin/uic3.exe") << endl;
- cacheStream << "QMAKE_RCC = $$QT_BUILD_TREE" << fixSeparators("/bin/rcc.exe") << endl;
- cacheStream << "QMAKE_DUMPCPP = $$QT_BUILD_TREE" << fixSeparators("/bin/dumpcpp.exe") << endl;
cacheStream << "QMAKE_INCDIR_QT = $$QT_BUILD_TREE" << fixSeparators("/include") << endl;
cacheStream << "QMAKE_LIBDIR_QT = $$QT_BUILD_TREE" << fixSeparators("/lib") << endl;
if (dictionary["CETEST"] == "yes") {
diff --git a/translations/translations.pri b/translations/translations.pri
index 57089ff..30aa996 100644
--- a/translations/translations.pri
+++ b/translations/translations.pri
@@ -8,11 +8,7 @@ defineReplace(prependAll) {
return ($$result)
}
-LUPDATE = $$QT_BUILD_TREE/bin/lupdate
-win32 {
- LUPDATE ~= s,/,$$QMAKE_DIR_SEP,
- LUPDATE = $${LUPDATE}.exe
-}
+qtPrepareTool(LUPDATE, lupdate)
LUPDATE += -locations relative -no-ui-lines
###### Qt Libraries
diff --git a/translations/translations.pro b/translations/translations.pro
index 8f37451..c6d46a3 100644
--- a/translations/translations.pro
+++ b/translations/translations.pro
@@ -1,10 +1,6 @@
TRANSLATIONS = $$files(*.ts)
-LRELEASE = $$QT_BUILD_TREE/bin/lrelease
-win32 {
- LRELEASE ~= s,/,$$QMAKE_DIR_SEP,
- LRELEASE = $${LRELEASE}.exe
-}
+qtPrepareTool(LRELEASE, lrelease)
contains(TEMPLATE_PREFIX, vc):vcproj = 1