diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-02-28 13:04:53 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-03-08 10:15:49 +0000 |
commit | 7773a412e5fd072a4edb1e957f2857130ea07a3c (patch) | |
tree | c7c7470c9f4e22a2c59fb758a84d3258e9b6e3ff | |
parent | a0e0cbc1f39aa25d372a9468014f2a3dd585959b (diff) |
Move opus, webp and ffmpeg to new configure system
Use the new configure system to control if we are using system opus,
webp and ffmpeg libraries.
Change-Id: I53db66ca1668fc939a51bf7811f967468456b924
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
-rw-r--r-- | configure.json | 48 | ||||
-rw-r--r-- | tools/qmake/mkspecs/features/configure.prf | 40 |
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_") |