summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qtbase.pro23
1 files changed, 23 insertions, 0 deletions
diff --git a/qtbase.pro b/qtbase.pro
index e66d9fbb28..4c41cfff50 100644
--- a/qtbase.pro
+++ b/qtbase.pro
@@ -81,6 +81,29 @@ syncqt.files = $$PWD/bin/syncqt
equals(QMAKE_HOST.os, Windows):syncqt.files += $$PWD/bin/syncqt.bat
INSTALLS += syncqt
+# If we are doing a prefix build, create a "module" pri which enables
+# qtPrepareTool() to find the non-installed syncqt.
+prefix_build {
+
+ cmd = $$shell_path($$OUT_PWD/bin/syncqt)
+ contains(QMAKE_HOST.os, Windows): \
+ cmd = $${cmd}.bat
+
+ TOOL_PRI = $$OUT_PWD/mkspecs/modules/qt_tool_syncqt.pri
+
+ TOOL_PRI_CONT = "QT_TOOL.syncqt.command = $$val_escape(cmd)"
+ write_file($$TOOL_PRI, TOOL_PRI_CONT)|error("Aborting.")
+
+ # Then, inject the new tool into the current cache state
+ !contains(QMAKE_INTERNAL_INCLUDED_FILES, $$TOOL_PRI) { # before the actual include()!
+ added = $$TOOL_PRI
+ cache(QMAKE_INTERNAL_INCLUDED_FILES, add transient, added)
+ }
+ include($$TOOL_PRI)
+ cache(QT_TOOL.syncqt.command, transient)
+
+}
+
#mkspecs
mkspecs.path = $$[QT_HOST_DATA]/mkspecs
mkspecs.files = \