diff mbox series

[v4,17/29] package/qt6/qt6base: add support for passing custom options

Message ID 20220826135503.20612-18-jesseevg@gmail.com
State Changes Requested
Headers show
Series Extend Qt6 configuration | expand

Commit Message

Jesse Van Gavere Aug. 26, 2022, 1:54 p.m. UTC
Signed-off-by: Jesse Van Gavere <jesseevg@gmail.com>
---
 package/qt6/qt6base/Config.in  | 10 ++++++++++
 package/qt6/qt6base/qt6base.mk |  3 +++
 2 files changed, 13 insertions(+)

Comments

Thomas Petazzoni Sept. 18, 2022, 10:41 a.m. UTC | #1
On Fri, 26 Aug 2022 15:54:51 +0200
Jesse Van Gavere <jesseevg@gmail.com> wrote:

> Signed-off-by: Jesse Van Gavere <jesseevg@gmail.com>
> ---
>  package/qt6/qt6base/Config.in  | 10 ++++++++++
>  package/qt6/qt6base/qt6base.mk |  3 +++
>  2 files changed, 13 insertions(+)

In Qt5, there were indeed zillions of options to fine-tune a lot of
things. Is that still the same in Qt6? I'd like to see some
evidence/facts, and not just copy/pasting what was done in qt5base just
because it was done in qt5base. 

Thomas
Jesse Van Gavere Sept. 18, 2022, 2:36 p.m. UTC | #2
Op zo 18 sep. 2022 om 12:41 schreef Thomas Petazzoni <
thomas.petazzoni@bootlin.com>:
>
> On Fri, 26 Aug 2022 15:54:51 +0200
> Jesse Van Gavere <jesseevg@gmail.com> wrote:
>
> > Signed-off-by: Jesse Van Gavere <jesseevg@gmail.com>
> > ---
> >  package/qt6/qt6base/Config.in  | 10 ++++++++++
> >  package/qt6/qt6base/qt6base.mk |  3 +++
> >  2 files changed, 13 insertions(+)
>
> In Qt5, there were indeed zillions of options to fine-tune a lot of
> things. Is that still the same in Qt6? I'd like to see some
> evidence/facts, and not just copy/pasting what was done in qt5base just
> because it was done in qt5base.
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
Hey Thomas,

In true Qt fashion there is still indeed many dozens of configuration
options, some of them are listed here
https://github.com/qt/qtbase/blob/dev/cmake/configure-cmake-mapping.md and
as you can see there some of those options are not covered by us but might
want to be turned off, but if you dig deeper into what can be configured
(using ccmake on the qt6 build folder with the main modules turned on is
useful to get a good overview) you can see a lot of other options that
aren't very obvious or easily found but I still found are very useful to
have the ability to turn them off to reduce the library size, an example of
this would be calendar features such as jalalicalendar/islamiccivilcalendar.
And there are a bunch of little configuration options that can make for
some easy space savings, which I did think about adding to create some
visibility on what's out there to reduce the library size, though decided
against for now until this patch series is processed, but even then it's
unlikely we'll ever cover every single configuration option so I do think
there's value in keeping this for those that want to push it to the limit
space wise.

Regards,
Jesse
diff mbox series

Patch

diff --git a/package/qt6/qt6base/Config.in b/package/qt6/qt6base/Config.in
index 0fc54a6c27..25f848f7a7 100644
--- a/package/qt6/qt6base/Config.in
+++ b/package/qt6/qt6base/Config.in
@@ -22,6 +22,16 @@  config BR2_PACKAGE_QT6BASE_CONCURRENT
 	help
 	  This options enables the Qt6Concurrent library.
 
+config BR2_PACKAGE_QT6BASE_CUSTOM_CONF_OPTS
+	string "Custom configuration options"
+	help
+	  Define custom qt6 configuration options which can be used to
+	  enable or disable options not managed by buildroot. These
+	  options are appended to the ones generated by buildroot and
+	  passed to qt6base during configuration.
+
+	  Use cmake style '-Doption_name=ON' or -Doption_name=OFF'.
+
 config BR2_PACKAGE_QT6BASE_DBUS
 	bool "DBus module"
 	depends on BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/qt6/qt6base/qt6base.mk b/package/qt6/qt6base/qt6base.mk
index 87ebc59cd6..ffb03314ec 100644
--- a/package/qt6/qt6base/qt6base.mk
+++ b/package/qt6/qt6base/qt6base.mk
@@ -184,5 +184,8 @@  ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
 QT6BASE_CONF_OPTS += -DCMAKE_SHARED_LINKER_FLAGS="-latomic"
 endif
 
+# Must be last so can override all options set by Buildroot
+QT6BASE_CONF_OPTS += $(call qstrip,$(BR2_PACKAGE_QT6BASE_CUSTOM_CONF_OPTS))
+
 $(eval $(cmake-package))
 $(eval $(host-cmake-package))