[Buildroot] [PATCH RFC 2/2] package/libcamera: initial support for Qt6 qcam

Quentin Schulz foss+buildroot at 0leil.net
Tue Apr 8 15:16:41 UTC 2025


From: Quentin Schulz <quentin.schulz at cherry.de>

This enables initial support for Qt6 qcam example application from
libcamera.

fontconfig is recommended otherwise the following messages can be
observed:

"""
QFontDatabase: Cannot find font directory /usr/lib/fonts.
Note that Qt no longer ships fonts. Deploy some (from https://dejavu-fonts.github.io/ for example) or switch to fontconfig.
"""

It seems to depend on UTF-8 as well (via BR2_GENERATE_LOCALE) otherwise
the following messages can be observed:

"""
Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8.
Qt depends on a UTF-8 locale, but has failed to switch to one.
If this causes problems, reconfigure your locale. See the locale(1) manual
for more information.
"""

Finally, while qcam starts and renders a liveview, the characters are
still rendered as square characters for now. Not sure what the issue is.

Signed-off-by: Quentin Schulz <quentin.schulz at cherry.de>
---
 package/libcamera/libcamera.mk | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/libcamera/libcamera.mk b/package/libcamera/libcamera.mk
index 6877662bdf02df1c7f8ff37039b3096e96e52481..892f9cf275d9fd117f3a57795220a1673c2455d7 100644
--- a/package/libcamera/libcamera.mk
+++ b/package/libcamera/libcamera.mk
@@ -85,6 +85,11 @@ LIBCAMERA_CONF_OPTS += -Dcam=enabled
 LIBCAMERA_DEPENDENCIES += libevent
 endif
 
+ifeq ($(BR2_PACKAGE_QT6BASE_WIDGETS)$(BR2_PACKAGE_QT6BASE_OPENGL),yy)
+LIBCAMERA_CONF_OPTS += -Dqcam=enabled
+LIBCAMERA_DEPENDENCIES += qt6base
+endif
+
 ifeq ($(BR2_PACKAGE_ELFUTILS),y)
 # Optional dependency on libdw
 LIBCAMERA_DEPENDENCIES += elfutils

-- 
2.49.0



More information about the buildroot mailing list