diff options
author | Andrew Knight <andrew.knight@digia.com> | 2014-02-11 13:49:18 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-11 14:52:16 +0100 |
commit | b4fe9ce225869917c4e822f936596563d7593480 (patch) | |
tree | 016ea7839f84c8371fc78ecd2f77504c8e7bf454 /mkspecs/features/win32 | |
parent | 49df5fc3d22669e8c534fc9985e9f4e09f8b2f62 (diff) |
qmake: Provide feature for windeployqt
windeployqt is a tool that aids in the deployment of Qt libraries and
other files on Windows. This feature (CONFIG+=windeployqt) adds
automatic invocation of windeployqt for qmake projects as a post-link
action. For Visual Studio projects, windeployqt is added as a custom
target which runs after linking, automatically adding the output as
deployment items.
Task-number: QTBUG-35630
Change-Id: I4cdcb1a7f70cedccb4a4e17be5eb9f5de35a4d66
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'mkspecs/features/win32')
-rw-r--r-- | mkspecs/features/win32/windeployqt.prf | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mkspecs/features/win32/windeployqt.prf b/mkspecs/features/win32/windeployqt.prf new file mode 100644 index 0000000000..f49df47ffe --- /dev/null +++ b/mkspecs/features/win32/windeployqt.prf @@ -0,0 +1,19 @@ +# Extra target for running windeployqt +qtPrepareTool(QMAKE_WINDEPLOYQT, windeployqt) +build_pass { + load(resolve_target) + + isEmpty(WINDEPLOYQT_OPTIONS): WINDEPLOYQT_OPTIONS = -qmldir $$shell_quote($$shell_path($$_PRO_FILE_PWD_)) + WINDEPLOYQT_TARGET = $$shell_quote($$shell_path($$QMAKE_RESOLVED_TARGET)) + WINDEPLOYQT_OUTPUT = $$shell_quote($$shell_path($$dirname(QMAKE_RESOLVED_TARGET)/$$basename(TARGET).windeployqt)) + windeployqt.target = windeployqt + windeployqt.commands = $$QMAKE_WINDEPLOYQT $$WINDEPLOYQT_OPTIONS -list target $$WINDEPLOYQT_TARGET > $$WINDEPLOYQT_OUTPUT + + windeployqt_clean.commands = if exist $$WINDEPLOYQT_OUTPUT for /f %i in ($$WINDEPLOYQT_OUTPUT) do $$QMAKE_DEL_FILE %~fi && $$QMAKE_DEL_DIR %~pi + QMAKE_EXTRA_TARGETS += windeployqt_clean + DISTCLEAN_DEPS += windeployqt_clean + QMAKE_DISTCLEAN += $$WINDEPLOYQT_OUTPUT +} else { + windeployqt.CONFIG += recursive +} +QMAKE_EXTRA_TARGETS += windeployqt |