From b90d508cb102a6095f74833f2fc8b0fd4a21a723 Mon Sep 17 00:00:00 2001 From: Alessandro Portale <alessandro.portale@nokia.com> Date: Thu, 22 Jul 2010 21:58:48 +0200 Subject: [PATCH] Win: Added QMAKE_EXTRA_TARGETS for copying qml files to $$OUT_PWD Instead of copying the files while executing qmake (system function), there is now an extra make target that gets executed every time make is called. Slightly better, but still ugly. Still waiting for Ossi's wisdom. --- .../qmlprojectmanager/wizards/templates/app.pro | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/plugins/qmlprojectmanager/wizards/templates/app.pro b/src/plugins/qmlprojectmanager/wizards/templates/app.pro index 63e81221d64..5827cc6b4b1 100644 --- a/src/plugins/qmlprojectmanager/wizards/templates/app.pro +++ b/src/plugins/qmlprojectmanager/wizards/templates/app.pro @@ -30,11 +30,17 @@ symbian { contains(DEFINES, NETWORKACCESS):TARGET.CAPABILITY += NetworkServices } else:win32 { # Ossi will want to kill me when he reads this - # TODO: let Ossi create a (post link step) deployment for windows - !contains(CONFIG, build_pass):for(deploymentfolder, DEPLOYMENTFOLDERS) { - pathSegments = $$split(deploymentfolder, /) - sourceAndTarget = $$deploymentfolder $$OUT_PWD/qml/$$last(pathSegments) - system($$QMAKE_COPY_DIR $$replace(sourceAndTarget, /, \\)) + # TODO: Let Ossi do some deployment-via-qmake magic + !isEqual(PWD,$$OUT_PWD):!contains(CONFIG, build_pass) { + copyCommand = @echo Copying Qml files... + for(deploymentfolder, DEPLOYMENTFOLDERS) { + pathSegments = $$split(deploymentfolder, /) + sourceAndTarget = $$PWD/$$deploymentfolder $$OUT_PWD/qml/$$last(pathSegments) + copyCommand += && $(COPY_DIR) $$replace(sourceAndTarget, /, \\) + } + copyqmlfiles.commands = $$copyCommand + first.depends = $(first) copyqmlfiles + QMAKE_EXTRA_TARGETS += first copyqmlfiles } } else { # TODO: make this work -- GitLab