diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2016-10-18 15:28:14 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2016-10-26 08:50:47 +0000 |
commit | c70d77dc766c9372a689035038420fb414e49b48 (patch) | |
tree | fbbf5dca5f14a1a2daf04f106d323df4535fdff8 | |
parent | 4184e15654148f832828e743289768ebdf3ff896 (diff) |
add launch targets to qt apps
this enables running non-installed prefix builds.
Change-Id: I4169f276ff28506d0532cfe01a03e0fa102a25f8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
-rw-r--r-- | mkspecs/features/qt_app.prf | 24 | ||||
-rw-r--r-- | mkspecs/features/qt_tool.prf | 1 |
2 files changed, 25 insertions, 0 deletions
diff --git a/mkspecs/features/qt_app.prf b/mkspecs/features/qt_app.prf index 90135b00a3..87e32d6d42 100644 --- a/mkspecs/features/qt_app.prf +++ b/mkspecs/features/qt_app.prf @@ -36,3 +36,27 @@ INSTALLS += target load(qt_targets) load(qt_common) + +no_launch_target: return() + +load(resolve_target) +launch.commands = $$shell_quote($$shell_path($$QMAKE_RESOLVED_TARGET)) +QMAKE_EXTRA_TARGETS += launch + +# Add environment for non-installed builds. +QT_TOOL_NAME = target +qtAddTargetEnv(launch.commands, QT) + +isEmpty(BUILDS)|build_pass { + launch.depends = first +} else { + # For exclusive builds, run the app only once. + launch.CONFIG = recursive + launch.target = launch_all + launch.recurse_target = launch + launch.commands = + + launch_first.depends = $$eval($$first(BUILDS).target)-launch + launch_first.target = launch + QMAKE_EXTRA_TARGETS += launch_first +} diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf index 93c952617d..4b73b4b8f7 100644 --- a/mkspecs/features/qt_tool.prf +++ b/mkspecs/features/qt_tool.prf @@ -9,6 +9,7 @@ # We mean it. # +CONFIG += no_launch_target load(qt_app) CONFIG += console |