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>
This commit is contained in:
Oswald Buddenhagen 2016-10-18 15:28:14 +02:00
parent 4184e15654
commit c70d77dc76
2 changed files with 25 additions and 0 deletions

View File

@ -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
}

View File

@ -9,6 +9,7 @@
# We mean it.
#
CONFIG += no_launch_target
load(qt_app)
CONFIG += console