qt5base: add Config.in option to pass custom Qt5 options
authorBryce Ferguson <bryce.ferguson@rockwellcollins.com>
Mon, 10 Oct 2016 20:02:37 +0000 (15:02 -0500)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 6 Feb 2017 15:50:56 +0000 (16:50 +0100)
To reduce the qt5base binary size, we can disable unnecessary features.
Instead of trying to map every qt5base option to buildroot, create a
single config that we can pass any option too. Then append those to the
ones generated by buildroot.

Signed-off-by: Brandon Maier <brandon.maier@rockwellcollins.com>
Signed-off-by: Bryce Ferguson <bryce.ferguson@rockwellcollins.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/qt5/qt5base/Config.in
package/qt5/qt5base/qt5base.mk

index ad95138380c7b870437a80fa80f715c4c60c765d..e273caa7733f69fbfab438b051c8f80d7a24866e 100644 (file)
@@ -16,6 +16,17 @@ config BR2_PACKAGE_QT5BASE
 
 if BR2_PACKAGE_QT5BASE
 
+config BR2_PACKAGE_QT5BASE_CUSTOM_CONF_OPTS
+       string "Custom configuration options"
+       help
+         Define custom qt5 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 qt5base during configuration.
+
+         E.g. to remove the Windows Vista style option, add the option
+         -no-feature-style_windowsvista.
+
 config BR2_PACKAGE_QT5BASE_LICENSE_APPROVED
        bool "Approve free license"
        help
index bbbaf0f4568fc073001c61919a9f4fa36c212d52..4cd14c0120daac20521a1f9e2571e7474e479e29 100644 (file)
@@ -27,6 +27,8 @@ QT5BASE_CONFIGURE_OPTS += \
        -no-pch \
        -shared
 
+QT5BASE_CONFIGURE_OPTS += $(call qstrip,$(BR2_PACKAGE_QT5BASE_CUSTOM_CONF_OPTS))
+
 # Uses libgbm from mesa3d
 ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL),y)
 QT5BASE_CONFIGURE_OPTS += -kms -gbm