summaryrefslogtreecommitdiffstats
path: root/src/buildtools/ninja.pro
blob: 1b15bcb6ba46d7ec839d694660550859391ecebc (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
TEMPLATE = aux

!debug_and_release: CONFIG += release

include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri)
QT_FOR_CONFIG += webengine-private


build_pass|!debug_and_release {
    !qtConfig(webengine-system-ninja): CONFIG(release, debug|release) {
        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))) && $$pythonPathForSystem() $$ninja_configure --bootstrap") {
                error("NINJA build error!")
            }
        }
    QMAKE_DISTCLEAN += $$out
    }
}