From bab745cb97fce3b50bae50ab4743e164fd18b77b Mon Sep 17 00:00:00 2001 From: Roy Kollen Svendsen Date: Tue, 25 Jun 2024 23:18:28 +0200 Subject: [PATCH] package/qt6/qt6base: add blind option to enable Test support on host We need host-qt6base with Testlib support when building host-qt6declarative with QuickTest support. QuickTest support is further required for building the qmltestrunner host tool. qt6declarative will fail to build if qmltestrunner is not available. Signed-off-by: Roy Kollen Svendsen Signed-off-by: Thomas Petazzoni --- package/qt6/qt6base/Config.in.host | 5 +++++ package/qt6/qt6base/qt6base.mk | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/package/qt6/qt6base/Config.in.host b/package/qt6/qt6base/Config.in.host index 286da0ff03..80bc13c7dc 100644 --- a/package/qt6/qt6base/Config.in.host +++ b/package/qt6/qt6base/Config.in.host @@ -7,3 +7,8 @@ config BR2_PACKAGE_HOST_QT6BASE_GUI # (e.g. Qt Tools). config BR2_PACKAGE_HOST_QT6BASE_NETWORK bool + +# Select this if you need host qt6 tools that require the Qt::Test module +# (e.g. qmltestrunner). +config BR2_PACKAGE_HOST_QT6BASE_TEST + bool diff --git a/package/qt6/qt6base/qt6base.mk b/package/qt6/qt6base/qt6base.mk index 8ab4d408bb..c6bd15fec2 100644 --- a/package/qt6/qt6base/qt6base.mk +++ b/package/qt6/qt6base/qt6base.mk @@ -87,7 +87,6 @@ HOST_QT6BASE_CONF_OPTS = \ -DFEATURE_concurrent=OFF \ -DFEATURE_xml=ON \ -DFEATURE_sql=OFF \ - -DFEATURE_testlib=OFF \ -DFEATURE_dbus=OFF \ -DFEATURE_icu=OFF \ -DFEATURE_glib=OFF \ @@ -129,6 +128,16 @@ else HOST_QT6BASE_CONF_OPTS += -DFEATURE_network=OFF endif +# We need host-qt6base with Testlib support when building host-qt6declarative +# with QuickTest support. QuickTest support is further required for building the +# qmltestrunner host tool. qt6declarative will fail to build if qmltestrunner is +# not available. +ifeq ($(BR2_PACKAGE_HOST_QT6BASE_TEST),y) +HOST_QT6BASE_CONF_OPTS += -DFEATURE_testlib=ON +else +HOST_QT6BASE_CONF_OPTS += -DFEATURE_testlib=OFF +endif + # Conditional blocks below are ordered by alphabetic ordering of the # BR2_PACKAGE_* option.