summaryrefslogtreecommitdiffstats
path: root/tools/qmake/mkspecs/features/configure.prf
blob: 85c3d46349b2c3434908e9ebad7e5e745b860a7b (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Load configure.prf from qtbase first
load(configure)
load(functions)

defineTest(runConfigure) {
    webengine_successfully_configured: return(true)
    linux:contains(QT_CONFIG,no-pkg-config) {
        skipBuild("pkg-config is required")
        return(false)
    }
    # Ignore the cached config tests results in case they were not successful
    CONFIG += recheck
    #Override the config.tests path
    QMAKE_CONFIG_TESTS_DIR = $$QTWEBENGINE_ROOT/tools/qmake/config.tests
    CONFIG_TESTS = $$files($$QMAKE_CONFIG_TESTS_DIR/*.pro, true)
    log("Running configure tests$${EOL}")
    for(test, CONFIG_TESTS) {
        test = $$basename(test)
        test ~= s/\\.pro$//
        qtCompileTest($$test)
    }
    # libcap-dev package doesn't ship .pc files on Ubuntu.
    linux:!config_libcap:skipBuild("libcap development package appears to be missing")
    linux:!config_khr:skipBuild("khronos development headers appear to be missing (mesa/libegl1-mesa-dev)")
    contains(QT_CONFIG, xcb) {
        for(package, $$list("libdrm xcomposite xi xrandr xscrnsaver")) {
            !packagesExist($$package):skipBuild("Unmet dependency: $$package")
        }
    }

    linux {
        packagesExist(minizip, zlib): WEBENGINE_CONFIG += config_system_minizip
        else: log("System zlib or minizip not found. Using Chromium's copies.$${EOL}")
        packagesExist(libwebp,libwebpdemux): WEBENGINE_CONFIG += config_system_libwebp
        else: log("System libwebp or libwebpdemux not found. Using Chromium's copies.$${EOL}")
        packagesExist(libxml-2.0,libxslt): WEBENGINE_CONFIG += config_system_libxslt
        else: log("System libxml2 or libxslt not found. Using Chromium's copies.$${EOL}")
        for(package, $$list("libevent flac jsoncpp opus speex")) {
            packagesExist($$package): WEBENGINE_CONFIG += config_system_$$package
            else: log("System $$package not found. Using Chromium's copy.$${EOL}")
        }
        packagesExist("\'vpx >= 1.4\'"): WEBENGINE_CONFIG += config_system_vpx
        else: log("System vpx >= 1.4 not found. Using Chromium's copy.$${EOL}")
        config_srtp: WEBENGINE_CONFIG += config_system_libsrtp
        else: log("System libsrtp not found. Using Chromium's copy.$${EOL}")
    }

    isEmpty(skipBuildReason): {
        cache(CONFIG, add, $$list(webengine_successfully_configured))
        !isEmpty(WEBENGINE_CONFIG): cache(CONFIG, add, $$list($$WEBENGINE_CONFIG))
    }
}