summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.json48
-rw-r--r--tools/qmake/mkspecs/features/configure.prf40
2 files changed, 74 insertions, 14 deletions
diff --git a/configure.json b/configure.json
index c91c2e6bf..ad9fd117c 100644
--- a/configure.json
+++ b/configure.json
@@ -10,6 +10,9 @@
"options": {
"alsa": "boolean",
"embedded": "boolean",
+ "ffmpeg": { "type": "enum", "name": "system-ffmpeg", "values": { "system": "yes", "qt": "no" } },
+ "opus": { "type": "enum", "name": "system-opus", "values": { "system": "yes", "qt": "no" } },
+ "webp": { "type": "enum", "name": "system-webp", "values": { "system": "yes", "qt": "no" } },
"pepper-plugins": "boolean",
"printing-and-pdf": "boolean",
"proprietary-codecs": "boolean",
@@ -32,6 +35,24 @@
"sources": [
{ "type": "pkgConfig", "args": "libpulse >= 0.9.10 libpulse-mainloop-glib" }
]
+ },
+ "ffmpeg": {
+ "label": "libavcodec libavformat libavutil",
+ "sources": [
+ { "type": "pkgConfig", "args": "libavcodec libavformat libavutil" }
+ ]
+ },
+ "opus": {
+ "label": "opus",
+ "sources": [
+ { "type": "pkgConfig", "args": "opus" }
+ ]
+ },
+ "webp": {
+ "label": "libwebp and libwebpdemux",
+ "sources": [
+ { "type": "pkgConfig", "args": "libwebp libwebpdemux" }
+ ]
}
},
@@ -99,6 +120,24 @@
"purpose": "Enables WebRTC support",
"output": [ "privateFeature" ]
},
+ "system-webp": {
+ "label": "libwebp and libwebpdemux",
+ "autoDetect": "config.unix",
+ "condition": "libs.webp",
+ "output": [ "privateFeature" ]
+ },
+ "system-opus": {
+ "label": "Opus",
+ "autoDetect": "config.unix",
+ "condition": "libs.opus",
+ "output": [ "privateFeature" ]
+ },
+ "system-ffmpeg": {
+ "label": "ffmpeg",
+ "autoDetect": false,
+ "condition": "libs.ffmpeg && features.system-opus && features.system-webp",
+ "output": [ "privateFeature" ]
+ },
"system-ninja": {
"label": "Using system ninja",
"condition": "tests.ninja",
@@ -132,6 +171,15 @@
"type": "feature",
"args": "pulseaudio",
"condition": "config.unix"
+ },
+ {
+ "section": "System libraries",
+ "condition": "config.unix",
+ "entries": [
+ "system-webp",
+ "system-opus",
+ "system-ffmpeg"
+ ]
}
]
}
diff --git a/tools/qmake/mkspecs/features/configure.prf b/tools/qmake/mkspecs/features/configure.prf
index 33d32b844..9caa1aa68 100644
--- a/tools/qmake/mkspecs/features/configure.prf
+++ b/tools/qmake/mkspecs/features/configure.prf
@@ -30,6 +30,12 @@ defineTest(runConfigure) {
qtConfig(spellchecker): WEBENGINE_CONFIG += use_spellchecker
qtConfig(webrtc): WEBENGINE_CONFIG += use_webrtc
qtConfig(embedded): WEBENGINE_CONFIG += embedded_build
+ qtConfig(system-webp): WEBENGINE_CONFIG += use_system_libwebp
+ else: WEBENGINE_CONFIG += use_bundled_libwebp
+ qtConfig(system-opus): WEBENGINE_CONFIG += use_system_opus
+ else: WEBENGINE_CONFIG += use_bundled_opus
+ qtConfig(system-ffmpeg): WEBENGINE_CONFIG += use_system_ffmpeg
+ else: WEBENGINE_CONFIG += use_bundled_ffmpeg
} else {
cross_compile: WEBENGINE_CONFIG += embedded_build
}
@@ -63,11 +69,15 @@ defineTest(runConfigure) {
}
packagesExist(minizip, zlib): WEBENGINE_CONFIG += use_system_minizip use_system_zlib
else: log("System zlib or minizip not found. Using Chromium's copies.$${EOL}")
- packagesExist(libwebp,libwebpdemux): WEBENGINE_CONFIG += use_system_libwebp use_system_libwebpdemux
- else: log("System libwebp or libwebpdemux not found. Using Chromium's copies.$${EOL}")
+ !isQtMinimum(5, 8) {
+ packagesExist(libwebp,libwebpdemux): WEBENGINE_CONFIG += use_system_libwebp use_system_libwebpdemux
+ else: log("System libwebp or libwebpdemux not found. Using Chromium's copies.$${EOL}")
+ packagesExist(opus): WEBENGINE_CONFIG += use_system_opus
+ else: log("System opus not found. Using Chromium's copy.$${EOL}")
+ }
packagesExist(libxml-2.0,libxslt): WEBENGINE_CONFIG += use_system_libxslt use_system_libxml2
else: log("System libxml2 or libxslt not found. Using Chromium's copies.$${EOL}")
- for(package, $$list("libevent jsoncpp opus protobuf")) {
+ for(package, $$list("libevent jsoncpp protobuf")) {
packagesExist($$package): WEBENGINE_CONFIG += use_system_$$package
else {
log("System $$package not found. Using Chromium's copy.$${EOL}")
@@ -124,21 +134,23 @@ defineTest(runConfigure) {
log(" ICU ................................ Using internal copy (Default, force system ICU with WEBENGINE_CONFIG+=use_system_icu)$${EOL}")
WEBENGINE_CONFIG += use_bundled_icu
}
- use?(system_ffmpeg) {
- packagesExist("libavcodec libavformat libavutil") {
- packagesExist("libwebp, libwebpdemux, opus, \'vpx >= 1.4\'"){
- log(" FFMPEG ............................. Using system version$${EOL}")
+ !isQtMinimum(5, 8) {
+ use?(system_ffmpeg) {
+ packagesExist("libavcodec libavformat libavutil") {
+ packagesExist("libwebp, libwebpdemux, opus, \'vpx >= 1.4\'"){
+ log(" FFMPEG ............................. Using system version$${EOL}")
+ } else {
+ log(" FFMPEG ............................. Conflicting FFMPEG dependencies$${EOL}")
+ skipBuild("Unmet dependencies: opus, vpx, libwebp, libwebpdemux")
+ }
} else {
- log(" FFMPEG ............................. Conflicting FFMPEG dependencies$${EOL}")
- skipBuild("Unmet dependencies: opus, vpx, libwebp, libwebpdemux")
+ log(" FFMPEG ............................. System FFMPEG not found$${EOL}")
+ skipBuild("Unmet dependencies: libavcodec, libavformat, libavutil")
}
} else {
- log(" FFMPEG ............................. System FFMPEG not found$${EOL}")
- skipBuild("Unmet dependencies: libavcodec, libavformat, libavutil")
+ log(" FFMPEG ............................. Using internal copy (Default, force system FFMPEG with WEBENGINE_CONFIG+=use_system_ffmpeg)$${EOL}")
+ WEBENGINE_CONFIG += use_bundled_ffmpeg
}
- } else {
- log(" FFMPEG ............................. Using internal copy (Default, force system FFMPEG with WEBENGINE_CONFIG+=use_system_ffmpeg)$${EOL}")
- WEBENGINE_CONFIG += use_bundled_ffmpeg
}
for(config, WEBENGINE_CONFIG) {
match = $$find(config, "^use_system_")