From: Jesse Van Gavere <jesseevg@gmail.com>
To: buildroot@buildroot.org
Cc: Jesse Van Gavere <jesseevg@gmail.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: [Buildroot] [PATCH v4 24/29] package/qt6/qt6base: add support for gui module widgets/opengl/graphics backends
Date: Fri, 26 Aug 2022 15:54:58 +0200 [thread overview]
Message-ID: <20220826135503.20612-25-jesseevg@gmail.com> (raw)
In-Reply-To: <20220826135503.20612-1-jesseevg@gmail.com>
This is a rather large patch as most of these options interact with each
other one way or another, so it's very difficult to split it much
further into sensible patches that still work
Signed-off-by: Jesse Van Gavere <jesseevg@gmail.com>
---
package/qt6/Config.in | 5 ++
package/qt6/qt6base/Config.in | 98 ++++++++++++++++++++++++++++++++++
package/qt6/qt6base/qt6base.mk | 84 +++++++++++++++++++++++++++++
3 files changed, 187 insertions(+)
diff --git a/package/qt6/Config.in b/package/qt6/Config.in
index 4b2b9a1174..32f32eb162 100644
--- a/package/qt6/Config.in
+++ b/package/qt6/Config.in
@@ -12,6 +12,11 @@ config BR2_PACKAGE_QT6_ARCH_SUPPORTS
default y if BR2_sparc64
depends on BR2_USE_MMU
+config BR2_PACKAGE_QT6_GL_AVAILABLE
+ bool
+ default y
+ depends on BR2_PACKAGE_HAS_LIBGL || BR2_PACKAGE_HAS_LIBGLES
+
comment "qt6 needs a toolchain w/ C++, threads, wchar, dynamic library, gcc >= 8, host gcc >= 8"
depends on !BR2_PACKAGE_QT5
depends on BR2_PACKAGE_QT6_ARCH_SUPPORTS
diff --git a/package/qt6/qt6base/Config.in b/package/qt6/qt6base/Config.in
index 9533076f54..52c1ba1421 100644
--- a/package/qt6/qt6base/Config.in
+++ b/package/qt6/qt6base/Config.in
@@ -43,11 +43,109 @@ config BR2_PACKAGE_QT6BASE_DBUS
config BR2_PACKAGE_QT6BASE_GUI
bool "gui module"
select BR2_PACKAGE_FREETYPE
+ # At least one graphic backend must be enabled, so enable
+ # linuxfb if nothing is enabled.
+ select BR2_PACKAGE_QT6BASE_LINUXFB if \
+ !BR2_PACKAGE_QT6BASE_DIRECTFB && \
+ !BR2_PACKAGE_QT6BASE_XCB && \
+ !BR2_PACKAGE_QT6BASE_EGLFS
help
This option enables the Qt6Gui library.
if BR2_PACKAGE_QT6BASE_GUI
+config BR2_PACKAGE_QT6BASE_WIDGETS
+ bool "widgets module"
+ select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_QT6BASE_XCB
+ help
+ This option enables the Qt6Widgets library.
+
+comment "OpenGL support needs an OpenGL-capable backend"
+ depends on !BR2_PACKAGE_QT6_GL_AVAILABLE
+
+config BR2_PACKAGE_QT6BASE_OPENGL
+ bool "OpenGL support"
+ depends on BR2_PACKAGE_QT6_GL_AVAILABLE
+ help
+ This option enables OpenGL support.
+
+if BR2_PACKAGE_QT6BASE_OPENGL
+
+choice
+ prompt "OpenGL API"
+ help
+ Select OpenGL API.
+
+config BR2_PACKAGE_QT6BASE_OPENGL_DESKTOP
+ bool "Desktop OpenGL"
+ depends on BR2_PACKAGE_HAS_LIBGL
+ help
+ Use desktop OpenGL.
+
+config BR2_PACKAGE_QT6BASE_OPENGL_ES2
+ bool "OpenGL ES 2.0+"
+ depends on BR2_PACKAGE_HAS_LIBGLES
+ help
+ Use OpenGL ES 2.0 and later versions.
+
+endchoice
+
+config BR2_PACKAGE_QT6BASE_OPENGL_LIB
+ bool "opengl module"
+ select BR2_PACKAGE_QT6BASE_WIDGETS
+ help
+ This option enables the Qt6OpenGL library. This library
+ includes OpenGL support classes provided to ease porting
+ from Qt 4.x.
+
+endif
+
+config BR2_PACKAGE_QT6BASE_LINUXFB
+ bool "linuxfb support"
+
+config BR2_PACKAGE_QT6BASE_DIRECTFB
+ bool "directfb support"
+ depends on BR2_PACKAGE_DIRECTFB
+
+comment "directfb backend available if directfb is enabled"
+ depends on !BR2_PACKAGE_DIRECTFB
+
+config BR2_PACKAGE_QT6BASE_XCB
+ bool "X.org XCB support"
+ depends on BR2_PACKAGE_XORG7
+ select BR2_PACKAGE_XLIB_LIBX11
+ select BR2_PACKAGE_LIBXCB
+ select BR2_PACKAGE_XCB_UTIL_IMAGE
+ select BR2_PACKAGE_XCB_UTIL_KEYSYMS
+ select BR2_PACKAGE_XCB_UTIL_RENDERUTIL
+ select BR2_PACKAGE_XCB_UTIL_WM
+ select BR2_PACKAGE_LIBXKBCOMMON
+
+comment "X.org XCB backend available if X.org is enabled"
+ depends on !BR2_PACKAGE_XORG7
+
+config BR2_PACKAGE_QT6BASE_EGLFS
+ bool "eglfs support"
+ depends on BR2_PACKAGE_HAS_LIBEGL
+ depends on BR2_PACKAGE_QT6_GL_AVAILABLE
+ select BR2_PACKAGE_QT6BASE_OPENGL
+
+comment "eglfs backend available if OpenGL and EGL are enabled"
+ depends on !BR2_PACKAGE_HAS_LIBEGL || !BR2_PACKAGE_QT6_GL_AVAILABLE
+
+config BR2_PACKAGE_QT6BASE_DEFAULT_QPA
+ string "Default graphical platform"
+ help
+ Choose the default platform abstraction to use for graphical
+ applications (e.g xcb, linuxfb, eglfs, ...). If this is
+ empty, the default for your architecture will be used
+ (usually this is eglfs).
+
+ You can get a list of supported platforms by running a Qt
+ application with the option "-platform help" on your
+ target. You can choose a different platform at runtime with
+ the -platform option.
+
config BR2_PACKAGE_QT6BASE_FONTCONFIG
bool "fontconfig support"
select BR2_PACKAGE_FONTCONFIG
diff --git a/package/qt6/qt6base/qt6base.mk b/package/qt6/qt6base/qt6base.mk
index 029afdd79b..c4b4876d53 100644
--- a/package/qt6/qt6base/qt6base.mk
+++ b/package/qt6/qt6base/qt6base.mk
@@ -182,10 +182,94 @@ else
QT6BASE_CONF_OPTS += -DFEATURE_fontconfig=OFF
endif
+# Uses libgbm from mesa3d
+ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL),y)
+QT6BASE_CONF_OPTS += -DFEATURE_gbm=ON
+QT6BASE_DEPENDENCIES += mesa3d
+else ifeq ($(BR2_PACKAGE_GCNANO_BINARIES),y)
+QT6BASE_CONF_OPTS += -DFEATURE_gbm=ON
+QT6BASE_DEPENDENCIES += gcnano-binaries
+else ifeq ($(BR2_PACKAGE_TI_SGX_LIBGBM),y)
+QT6BASE_CONF_OPTS += -DFEATURE_gbm=ON
+QT6BASE_DEPENDENCIES += ti-sgx-libgbm
+else ifeq ($(BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_WL),y)
+QT6BASE_CONF_OPTS += -DFEATURE_gbm=ON
+QT6BASE_DEPENDENCIES += imx-gpu-viv
+else
+QT6BASE_CONF_OPTS += -DFEATURE_gbm=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_QT6BASE_EGLFS),y)
+QT6BASE_CONF_OPTS += -DFEATURE_eglfs=ON
+QT6BASE_DEPENDENCIES += libegl
+else
+QT6BASE_CONF_OPTS += -DFEATURE_eglfs=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_QT6BASE_OPENGL_DESKTOP),y)
+QT6BASE_CONF_OPTS += -DFEATURE_opengl=ON -DFEATURE_opengl_desktop=ON
+QT6BASE_DEPENDENCIES += libgl
+else ifeq ($(BR2_PACKAGE_QT6BASE_OPENGL_ES2),y)
+QT6BASE_CONF_OPTS += -DFEATURE_opengl=ON -DFEATURE_opengles2=ON
+QT6BASE_DEPENDENCIES += libgles
+else
+QT6BASE_CONF_OPTS += -DFEATURE_opengl=OFF -DINPUT_opengl=no
+endif
+
+# only enable gtk support if libgtk3 X11 backend is enabled
+ifeq ($(BR2_PACKAGE_LIBGTK3)$(BR2_PACKAGE_LIBGTK3_X11),yy)
+QT6BASE_CONF_OPTS += -DFEATURE_gtk3=ON
+QT6BASE_DEPENDENCIES += libgtk3
+else
+QT6BASE_CONF_OPTS += -DFEATURE_gtk3=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_QT6BASE_WIDGETS),y)
+QT6BASE_CONF_OPTS += -DFEATURE_widgets=ON
+
+ifeq ($(BR2_PACKAGE_QT6BASE_LINUXFB),y)
+QT6BASE_CONF_OPTS += -DFEATURE_linuxfb=ON
+else
+QT6BASE_CONF_OPTS += -DFEATURE_linuxfb=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_QT6BASE_DIRECTFB),y)
+QT6BASE_CONF_OPTS += -DFEATURE_directfb=ON
+QT6BASE_DEPENDENCIES += directfb
+else
+QT6BASE_CONF_OPTS += -DFEATURE_directfb=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_QT6BASE_XCB),y)
+QT6BASE_CONF_OPTS += \
+ -DFEATURE_xcb=ON \
+ -DFEATURE_xcb_xlib=ON \
+ -DFEATURE_xkbcommon=ON \
+ -DFEATURE_xkbcommon_x11=ON
+QT6BASE_DEPENDENCIES += \
+ libxcb \
+ xcb-util-wm \
+ xcb-util-image \
+ xcb-util-keysyms \
+ xcb-util-renderutil \
+ xlib_libX11 \
+ libxkbcommon
+QT6BASE_DEPENDENCIES += xlib_libXext
+else
+QT6BASE_CONF_OPTS += -DFEATURE_xcb=OFF
+endif
+
+else
+QT6BASE_CONF_OPTS += -DFEATURE_widgets=OFF
+endif
+
else
QT6BASE_CONF_OPTS += -DFEATURE_gui=OFF
endif
+QT6BASE_DEFAULT_QPA = $(call qstrip,$(BR2_PACKAGE_QT6BASE_DEFAULT_QPA))
+QT6BASE_CONF_OPTS += $(if $(QT6BASE_DEFAULT_QPA),-DQT_QPA_DEFAULT_PLATFORM=$(QT6BASE_DEFAULT_QPA))
+
ifeq ($(BR2_PACKAGE_OPENSSL),y)
QT6BASE_CONF_OPTS += -DINPUT_openssl=yes
QT6BASE_DEPENDENCIES += openssl
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2022-08-26 14:00 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-26 13:54 [Buildroot] [PATCH v4 00/29] Extend Qt6 configuration Jesse Van Gavere
2022-08-26 13:54 ` [Buildroot] [PATCH v4 01/29] package/qt6/qt6base: Add qt6base hash file Jesse Van Gavere
2022-08-27 21:12 ` Arnout Vandecappelle
2022-08-26 13:54 ` [Buildroot] [PATCH v4 02/29] package/qt6/qt6base: Add license information Jesse Van Gavere
2022-08-27 21:15 ` Arnout Vandecappelle
2022-08-26 13:54 ` [Buildroot] [PATCH v4 03/29] package/qt6/qt6base: add support for network module Jesse Van Gavere
2022-08-29 20:07 ` Thomas Petazzoni via buildroot
2022-08-26 13:54 ` [Buildroot] [PATCH v4 04/29] package/qt6/qt6base: add support for concurrent module Jesse Van Gavere
2022-08-29 20:07 ` Thomas Petazzoni via buildroot
2022-08-26 13:54 ` [Buildroot] [PATCH v4 05/29] package/qt6/qt6base: add support for xml module Jesse Van Gavere
2022-08-29 20:07 ` Thomas Petazzoni via buildroot
2022-08-26 13:54 ` [Buildroot] [PATCH v4 06/29] package/qt6/qt6base: add support for test module Jesse Van Gavere
2022-08-29 20:07 ` Thomas Petazzoni via buildroot
2022-08-26 13:54 ` [Buildroot] [PATCH v4 07/29] package/qt6/qt6base: add support for dbus module Jesse Van Gavere
2022-08-29 20:07 ` Thomas Petazzoni via buildroot
2022-08-26 13:54 ` [Buildroot] [PATCH v4 08/29] package/qt6/qt6base: add support for syslog backend Jesse Van Gavere
2022-08-29 20:07 ` Thomas Petazzoni via buildroot
2022-08-26 13:54 ` [Buildroot] [PATCH v4 09/29] package/qt6/qt6base: add qt support for journald when using systemd Jesse Van Gavere
2022-09-18 8:50 ` Thomas Petazzoni via buildroot
2022-08-26 13:54 ` [Buildroot] [PATCH v4 10/29] package/qt6/qt6base: add qt support for zstd when using the package Jesse Van Gavere
2022-09-18 8:56 ` Thomas Petazzoni
2022-08-26 13:54 ` [Buildroot] [PATCH v4 11/29] package/qt6/qt6base: add qt support for SSE/AVX SIMD extensions Jesse Van Gavere
2022-09-18 9:57 ` Thomas Petazzoni
2022-09-18 14:13 ` Jesse Van Gavere
2022-08-26 13:54 ` [Buildroot] [PATCH v4 12/29] package/qt6/qt6base: add linking to libatomic Jesse Van Gavere
2022-09-18 10:03 ` Thomas Petazzoni
2022-08-26 13:54 ` [Buildroot] [PATCH v4 13/29] package/qt6/qt6base: add support to link qt to openssl Jesse Van Gavere
2022-09-18 10:19 ` Thomas Petazzoni
2022-08-26 13:54 ` [Buildroot] [PATCH v4 14/29] package/qt6/qt6base: add qt icu support Jesse Van Gavere
2022-09-18 10:35 ` Thomas Petazzoni
2022-08-26 13:54 ` [Buildroot] [PATCH v4 15/29] package/qt6/qt6base: add qt libudev support Jesse Van Gavere
2022-09-18 10:38 ` Thomas Petazzoni
2022-08-26 13:54 ` [Buildroot] [PATCH v4 16/29] package/qt6/qt6base: add qt libglib2 support Jesse Van Gavere
2022-09-18 10:40 ` Thomas Petazzoni
2022-08-26 13:54 ` [Buildroot] [PATCH v4 17/29] package/qt6/qt6base: add support for passing custom options Jesse Van Gavere
2022-09-18 10:41 ` Thomas Petazzoni
2022-09-18 14:36 ` Jesse Van Gavere
2022-08-26 13:54 ` [Buildroot] [PATCH v4 18/29] package/qt6/qt6base: add support for sql module w/ mysql Jesse Van Gavere
2022-09-20 6:38 ` Thomas Petazzoni
2022-08-26 13:54 ` [Buildroot] [PATCH v4 19/29] package/qt6/qt6base: add support for sql module w/ postgresql Jesse Van Gavere
2022-09-20 6:38 ` Thomas Petazzoni
2022-08-26 13:54 ` [Buildroot] [PATCH v4 20/29] package/qt6/qt6base: add support for sql module w/ sqlite Jesse Van Gavere
2022-09-20 6:39 ` Thomas Petazzoni
2022-08-26 13:54 ` [Buildroot] [PATCH v4 21/29] package/qt6/qt6base: add support for gui module Jesse Van Gavere
2022-08-26 13:54 ` [Buildroot] [PATCH v4 22/29] package/qt6/qt6base: add support for gui module fontconfig/harfbuzz Jesse Van Gavere
2022-08-26 13:54 ` [Buildroot] [PATCH v4 23/29] package/qt6/qt6base: Add support for gui module jpeg/png/gif image format Jesse Van Gavere
2022-08-26 13:54 ` Jesse Van Gavere [this message]
2022-08-26 13:54 ` [Buildroot] [PATCH v4 25/29] package/qt6/qt6base: add support for gui module tslib Jesse Van Gavere
2022-08-26 13:55 ` [Buildroot] [PATCH v4 26/29] package/qt6/qt6base: add support for gui module libinput Jesse Van Gavere
2022-08-26 13:55 ` [Buildroot] [PATCH v4 27/29] package/qt6/qt6base: add support for gui module kms Jesse Van Gavere
2022-08-26 13:55 ` [Buildroot] [PATCH v4 28/29] package/qt6/qt6base: add support for gui module printsupport/cups Jesse Van Gavere
2022-08-26 13:55 ` [Buildroot] [PATCH v4 29/29] package/qt6/qt6base: add support for building examples Jesse Van Gavere
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220826135503.20612-25-jesseevg@gmail.com \
--to=jesseevg@gmail.com \
--cc=buildroot@buildroot.org \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox