blob: 092888e0e59f59d5e0a6479ab484848b431ce9ea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
TEMPLATE = aux
CONFIG += release
option(host_build)
defineReplace(buildGn) {
gn_args = $$1
out = $$gnPath()
!qtConfig(system-ninja): ninja_path = "--path $$ninjaPath()"
# check if it is not already build
!exists($$out) {
mkpath($$dirname(out))
src_3rd_party_dir = $$absolute_path("$${getChromiumSrcDir()}/../", "$$QTWEBENGINE_ROOT")
gn_bootstrap = $$system_path($$absolute_path(chromium/tools/gn/bootstrap/bootstrap.py, $$src_3rd_party_dir))
gn_args = $$system_quote($$gn_args)
gn_configure = $$system_quote($$gn_bootstrap) --shadow --gn-gen-args=$$gn_args $$ninja_path
!system("cd $$system_quote($$system_path($$dirname(out))) && python $$gn_configure") {
error("GN build error!")
}
}
}
isQtMinimum(5, 8) {
include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri)
QT_FOR_CONFIG += webengine-private
}
!qtConfig(system-gn) {
buildgn.target = build_gn
buildgn.commands = $$buildGn($$gnArgs())
QMAKE_EXTRA_TARGETS += buildgn
default_target.target = first
default_target.depends = buildgn
QMAKE_EXTRA_TARGETS += default_target
}
|