qt: Add option to build and install tools on the
v6 cover qt: Add option to build and install tools on the
Changes since v5:
* Replaced nested if with $(if ...)
Changes since v4:
* Fixed to handle empty $(QT_TARGET_PROGRAMS-y) correctly
Changes since v3:
* Fixed comment and typo
Changes since v2:
* Commented tools dependency on SQL module
* Replaced $(if $(...)) for VAR-$(...)
* More granularity on the installation of target tools
PATCH v6 1/1 qt: Add option to build and install tools on the target
Signed-off-by Ismael Luceno <[email protected]>
--- package/qt/Config.in | 25 +++++++++++++++++++++++++ package/qt/qt.mk | 10 ++++++++++ 2 files changed, 35 insertions(+), 0 deletions(-)
package/qt/Config.in +25 -0
@@ -16,6 +16,31 @@ config BR2_PACKAGE_QT_DEBUG help If unsure, say N. +menuconfig BR2_PACKAGE_QT_TOOLS + bool "Compile and install tools" + depends on BR2_PACKAGE_QT_SQL_MODULE && BR2_PACKAGE_QT_GUI_MODULE + # SQL module is needed to build, but only required at run-time by a + # few tools (assistant, designer, qmlviewer). + +if BR2_PACKAGE_QT_TOOLS + +config BR2_PACKAGE_QT_TOOLS_QTCONFIG + bool "qtconfig" + depends on BR2_PACKAGE_QT_GUI_X11 + +config BR2_PACKAGE_QT_TOOLS_QMLVIEWER + bool "qmlviewer" + depends on BR2_PACKAGE_QT_DECLARATIVE + +config BR2_PACKAGE_QT_TOOLS_QMLPLUGINDUMP + bool "qmlplugindump" + depends on BR2_PACKAGE_QT_DECLARATIVE + +endif # BR2_PACKAGE_QT_TOOLS + +comment "Tools need the SQL and GUI modules" + depends on !BR2_PACKAGE_QT_SQL_MODULE || !BR2_PACKAGE_QT_GUI_MODULE + config BR2_PACKAGE_QT_DEMOS bool "Compile and install demos and examples (with code)" help
package/qt/qt.mk +10 -0
@@ -417,6 +417,12 @@ else QT_CONFIGURE_OPTS += -no-declarative endif +ifeq ($(BR2_PACKAGE_QT_TOOLS),y) +QT_CONFIGURE_OPTS += -make tools +else +QT_CONFIGURE_OPTS += -nomake tools +endif + # ccache and precompiled headers don't play well together ifeq ($(BR2_CCACHE),y) QT_CONFIGURE_OPTS += -no-pch
@@ -514,6 +520,9 @@ endef QT_INSTALL_LIBS += QtCore QT_HOST_PROGRAMS += moc rcc qmake lrelease +QT_TARGET_PROGRAMS-$(BR2_PACKAGE_QT_TOOLS_QTCONFIG) += qtconfig +QT_TARGET_PROGRAMS-$(BR2_PACKAGE_QT_TOOLS_QMLVIEWER) += qmlviewer +QT_TARGET_PROGRAMS-$(BR2_PACKAGE_QT_TOOLS_QMLPLUGINDUMP) += qmlplugindump ifeq ($(BR2_PACKAGE_QT_GUI_MODULE),y) QT_INSTALL_LIBS += QtGui
@@ -583,6 +592,7 @@ define QT_INSTALL_STAGING_CMDS $(MAKE) -C $(@D) install mkdir -p $(HOST_DIR)/usr/bin mv $(addprefix $(STAGING_DIR)/usr/bin/,$(QT_HOST_PROGRAMS)) $(HOST_DIR)/usr/bin + $(if $(QT_TARGET_PROGRAMS-y),mv $(addprefix $(STAGING_DIR)/usr/bin/,$(QT_TARGET_PROGRAMS-y)) $(TARGET_DIR)/usr/bin) rm -rf $(HOST_DIR)/usr/mkspecs mv $(STAGING_DIR)/usr/mkspecs $(HOST_DIR)/usr $(QT_INSTALL_QT_CONF)
Signature · 1 line
1.7.9.1