diff mbox series

[v4,29/29] package/qt6/qt6base: add support for building examples

Message ID 20220826135503.20612-30-jesseevg@gmail.com
State Superseded
Headers show
Series Extend Qt6 configuration | expand

Commit Message

Jesse Van Gavere Aug. 26, 2022, 1:55 p.m. UTC
Now with dependency on DBus/OpenGL
A minimal set of Qt options was selected for which building the examples
started working.

Signed-off-by: Jesse Van Gavere <jesseevg@gmail.com>
---
 package/qt6/qt6base/Config.in  | 17 +++++++++++++++++
 package/qt6/qt6base/qt6base.mk |  6 ++++++
 2 files changed, 23 insertions(+)
diff mbox series

Patch

diff --git a/package/qt6/qt6base/Config.in b/package/qt6/qt6base/Config.in
index ffa5a56b40..5c751dc109 100644
--- a/package/qt6/qt6base/Config.in
+++ b/package/qt6/qt6base/Config.in
@@ -40,6 +40,23 @@  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_AVAILABLE
+	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
+	help
+	  If unsure, say N.
+
+comment "Building examples needs OpenGL/DBus support"
+	depends on !BR2_PACKAGE_QT6_GL_AVAILABLE || !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 9b5328e5f2..2324d3825c 100644
--- a/package/qt6/qt6base/qt6base.mk
+++ b/package/qt6/qt6base/qt6base.mk
@@ -335,6 +335,12 @@  else
 QT6BASE_CONF_OPTS += -DFEATURE_icu=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