From d72e1e371b50572e3115b057916b28051ec65434 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 7 Feb 2013 16:32:30 +0100 Subject: create tool pri file for syncqt so that *really* all non-installed tools are properly registered. if some day we have more build scripts, this code should be centralized in a .prf file. Change-Id: I5b292a4b30199cb59838319f2dc9f88cd54bb57d Reviewed-by: Joerg Bornemann Reviewed-by: Oswald Buddenhagen --- qtbase.pro | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'qtbase.pro') 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 = \ -- cgit v1.2.3