diff mbox series

[v6,12/13] package/qt6/qt6base: add support for building examples

Message ID 20230207171721.2973997-13-angelo@amarulasolutions.com
State Changes Requested
Headers show
Series Extend Qt6 configuration | expand

Commit Message

Angelo Compagnucci Feb. 7, 2023, 5:17 p.m. UTC
From: Jesse Van Gavere <jesseevg@gmail.com>

The selected options make the default examples set to actually compile.

Signed-off-by: Jesse Van Gavere <jesseevg@gmail.com>
Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
---
 package/qt6/qt6base/Config.in  | 18 ++++++++++++++++++
 package/qt6/qt6base/qt6base.mk |  6 ++++++
 2 files changed, 24 insertions(+)

Comments

Thomas Petazzoni Feb. 8, 2023, 11:16 a.m. UTC | #1
On Tue,  7 Feb 2023 18:17:20 +0100
Angelo Compagnucci <angelo@amarulasolutions.com> wrote:

> +config BR2_PACKAGE_QT6BASE_EXAMPLES
> +	bool "Compile and install examples "
> +	depends on BR2_PACKAGE_QT6_GL_SUPPORTS
> +	select BR2_PACKAGE_QT6BASE_DBUS
> +	select BR2_PACKAGE_QT6BASE_NETWORK
> +	select BR2_PACKAGE_QT6BASE_XML
> +	select BR2_PACKAGE_QT6BASE_DBUS
> +	select BR2_PACKAGE_QT6BASE_GUI
> +	select BR2_PACKAGE_QT6BASE_WIDGETS
> +	select BR2_PACKAGE_QT6BASE_OPENGL
> +	select BR2_PACKAGE_QT6BASE_OPENGL_LIB

Due to comments/issues on previous patches, this option does not exist,
so I'm not able to apply this patch right now.

Could you resend as part of a new series after checking this
BR2_PACKAGE_QT6BASE_OPENGL_LIB thing?

Also, are all those options needed to have the examples? I believe with
Qt5, when you enable the examples, it builds only the examples that it
can build based on the features enabled in Qt. This was very handy. The
same is not possible here?

Best regards,

Thomas
diff mbox series

Patch

diff --git a/package/qt6/qt6base/Config.in b/package/qt6/qt6base/Config.in
index 4d13128661..4ae5e96ef0 100644
--- a/package/qt6/qt6base/Config.in
+++ b/package/qt6/qt6base/Config.in
@@ -30,6 +30,24 @@  config BR2_PACKAGE_QT6BASE_DBUS
 	help
 	  This option enables the D-Bus module.
 
+config BR2_PACKAGE_QT6BASE_EXAMPLES
+	bool "Compile and install examples "
+	depends on BR2_PACKAGE_QT6_GL_SUPPORTS
+	select BR2_PACKAGE_QT6BASE_DBUS
+	select BR2_PACKAGE_QT6BASE_NETWORK
+	select BR2_PACKAGE_QT6BASE_XML
+	select BR2_PACKAGE_QT6BASE_DBUS
+	select BR2_PACKAGE_QT6BASE_GUI
+	select BR2_PACKAGE_QT6BASE_WIDGETS
+	select BR2_PACKAGE_QT6BASE_OPENGL
+	select BR2_PACKAGE_QT6BASE_OPENGL_LIB
+	select BR2_PACKAGE_QT6BASE_CONCURRENT
+	help
+	  If unsure, say N.
+
+comment "Building examples needs OpenGL/DBus support"
+	depends on !BR2_PACKAGE_QT6_GL_SUPPORTS || !BR2_PACKAGE_DBUS
+
 config BR2_PACKAGE_QT6BASE_GUI
 	bool "gui module"
 	select BR2_PACKAGE_FREETYPE
diff --git a/package/qt6/qt6base/qt6base.mk b/package/qt6/qt6base/qt6base.mk
index 97986a3c2b..ec1c65f827 100644
--- a/package/qt6/qt6base/qt6base.mk
+++ b/package/qt6/qt6base/qt6base.mk
@@ -310,6 +310,12 @@  QT6BASE_CONF_OPTS += -DFEATURE_dbus=OFF
 HOST_QT6BASE_CONF_OPTS += -DFEATURE_dbus=OFF
 endif
 
+ifeq ($(BR2_PACKAGE_QT6BASE_EXAMPLES),y)
+QT6BASE_CONF_OPTS += -DQT_BUILD_EXAMPLES=ON
+else
+QT6BASE_CONF_OPTS += -DQT_BUILD_EXAMPLES=OFF
+endif
+
 ifeq ($(BR2_PACKAGE_QT6BASE_NETWORK),y)
 QT6BASE_CONF_OPTS += -DFEATURE_network=ON
 else