package/qt6/qt6multimedia: fix ffmpeg plugin build for x11

The following defconfig:

BR2_arm=y
BR2_cortex_a9=y
BR2_ARM_ENABLE_VFP=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_MUSL_STABLE=y
BR2_PACKAGE_QT6=y
BR2_PACKAGE_QT6BASE_XCB=y
BR2_PACKAGE_QT6MULTIMEDIA=y
BR2_PACKAGE_QT6MULTIMEDIA_FFMPEG=y
BR2_PACKAGE_XORG7=y

would fail to build, due to <X11/extensions/Xext.h> being not found,
and then <X11/extensions/Xrandr.h> being not found. Fix that up by
introducing the necessary dependencies.

There are no build failures reported for qt6multimedia in the
autobuilders, so there is no reference to a build failure.

Signed-off-by: Roy Kollen Svendsen <roykollensvendsen@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Arnout Vandecappelle <arnout@rnout.be>
This commit is contained in:
Roy Kollen Svendsen
2025-05-16 23:04:48 +02:00
committed by Arnout Vandecappelle
parent adff0d37ba
commit 04d1ee0105
2 changed files with 11 additions and 0 deletions

View File

@@ -38,6 +38,11 @@ config BR2_PACKAGE_QT6MULTIMEDIA_FFMPEG
select BR2_PACKAGE_FFMPEG_SWSCALE
select BR2_PACKAGE_QT6BASE_CONCURRENT
select BR2_PACKAGE_QT6MULTIMEDIA_PULSEAUDIO
# libxext/libxrandr are needed for ffmpeg plugin to build with
# X11 support:
# https://code.qt.io/cgit/qt/qtmultimedia.git/tree/src/plugins/multimedia/ffmpeg/CMakeLists.txt?h=6.8.1#n198
select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7
select BR2_PACKAGE_XLIB_LIBXRANDR if BR2_PACKAGE_XORG7
help
This option enables ffmpeg media backend.

View File

@@ -66,6 +66,12 @@ endif
ifeq ($(BR2_PACKAGE_QT6MULTIMEDIA_FFMPEG),y)
QT6MULTIMEDIA_CONF_OPTS += -DFEATURE_ffmpeg=ON
QT6MULTIMEDIA_DEPENDENCIES += ffmpeg
# libxext/libxrandr are needed for ffmpeg plugin to build with X11
# support:
# https://code.qt.io/cgit/qt/qtmultimedia.git/tree/src/plugins/multimedia/ffmpeg/CMakeLists.txt?h=6.8.1#n198
ifeq ($(BR2_PACKAGE_XORG7),y)
QT6MULTIMEDIA_DEPENDENCIES += xlib_libXext xlib_libXrandr
endif
else
QT6MULTIMEDIA_CONF_OPTS += -DFEATURE_ffmpeg=OFF
endif