summaryrefslogtreecommitdiffstats
path: root/src/buildtools/ninja.pro
blob: c391d6e84f3c7697a2dbcf2da4bc7dbf21a8b805 (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
TEMPLATE = aux
CONFIG += release

defineReplace(buildNinja) {
   out = $$ninjaPath()
   # check if it is not already build
   !exists($$out) {
       mkpath($$dirname(out))
       src_3rd_party_dir = $$absolute_path("$${getChromiumSrcDir()}/../", "$$QTWEBENGINE_ROOT")
       ninja_configure =  $$system_quote($$system_path($$absolute_path(ninja/configure.py, $$src_3rd_party_dir)))
       !system("cd $$system_quote($$system_path($$dirname(out))) && python $$ninja_configure --bootstrap") {
            error("NINJA build error!")
       }
   }
}

isQtMinimum(5, 8) {
    include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri)
    QT_FOR_CONFIG += webengine-private
}

!qtConfig(system-ninja) {
    buildninja.target = build_ninja
    buildninja.commands = $$buildNinja()
    QMAKE_EXTRA_TARGETS += buildninja

    default_target.target = first
    default_target.depends = buildninja
    QMAKE_EXTRA_TARGETS += default_target
}