[8/9] qt5serialport: install examples to target

Message ID 20180612123206.31523-9-gael.portay@savoirfairelinux.com
State Accepted
Headers show
Series
  • qt5: install missing examples
Related show

Commit Message

Gaël PORTAY June 12, 2018, 12:32 p.m.
When BR2_PACKAGE_QT5BASE_EXAMPLES is set, the examples for this module
are installed in the staging directory but they are not shipped to the
target.

This commit copies the examples `serialport' from the staging directory
to the target.

Signed-off-by: Gaël PORTAY <gael.portay@savoirfairelinux.com>
---
 package/qt5/qt5serialport/qt5serialport.mk | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

Patch

diff --git a/package/qt5/qt5serialport/qt5serialport.mk b/package/qt5/qt5serialport/qt5serialport.mk
index 1cddaf857e..2b0953586b 100644
--- a/package/qt5/qt5serialport/qt5serialport.mk
+++ b/package/qt5/qt5serialport/qt5serialport.mk
@@ -32,9 +32,20 @@  define QT5SERIALPORT_INSTALL_STAGING_CMDS
 endef
 
 ifeq ($(BR2_STATIC_LIBS),)
-define QT5SERIALPORT_INSTALL_TARGET_CMDS
+define QT5SERIALPORT_INSTALL_TARGET_LIBS
 	cp -dpf $(STAGING_DIR)/usr/lib/libQt5SerialPort.so.* $(TARGET_DIR)/usr/lib
 endef
 endif
 
+ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
+define QT5SERIALPORT_INSTALL_TARGET_EXAMPLES
+	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/serialport $(TARGET_DIR)/usr/lib/qt/examples/
+endef
+endif
+
+define QT5SERIALPORT_INSTALL_TARGET_CMDS
+	$(QT5SERIALPORT_INSTALL_TARGET_LIBS)
+	$(QT5SERIALPORT_INSTALL_TARGET_EXAMPLES)
+endef
+
 $(eval $(generic-package))