Skip to contentSkip to conversation

qtuio: correct install-target/staging when Qt library type is 'static'

PATCH New Thomas De Schampheleire 2 participants 2 messages Feb 17, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qtuio: correct install-target/staging when Qt library type is 'static'

If BR2_PACKAGE_QT_STATIC is set, qtuio will not build a .so file, but .a. However, the custom INSTALL_TARGET_CMDS and INSTALL_STAGING_CMDS unconditionally attempted to copy the .so file.

This commit checks the requested Qt library type and copies the right library for each case, taking into account that the static .a file does not need to be copied to the target directory.

---
 package/qtuio/qtuio.mk |  13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)
package/qtuio/qtuio.mk +11 -2
@@ -51,13 +51,22 @@ define QTUIO_INSTALL_EXAMPLES
 endef
 endif
 
+ifeq ($(BR2_PACKAGE_QT_STATIC),y)
+QTUIO_LIBRARY = libqTUIO.a
+else
+QTUIO_LIBRARY = libqTUIO.so*
+define QTUIO_INSTALL_TARGET_LIBRARY
+	cp -dpf $(@D)/lib/$(QTUIO_LIBRARY) $(TARGET_DIR)/usr/lib
+endef
+endif
+
 define QTUIO_INSTALL_TARGET_CMDS
-	cp -dpf $(@D)/lib/libqTUIO.so* $(TARGET_DIR)/usr/lib
+	$(QTUIO_INSTALL_TARGET_LIBRARY)
 	$(QTUIO_INSTALL_EXAMPLES)
 endef
 
 define QTUIO_INSTALL_STAGING_CMDS
-	cp -dpf $(@D)/lib/libqTUIO.so* $(STAGING_DIR)/usr/lib
+	cp -dpf $(@D)/lib/$(QTUIO_LIBRARY) $(STAGING_DIR)/usr/lib
 endef
 
 $(eval $(generic-package))
#1 lore raw

PATCH 1/1 qtuio: correct install-target/staging when Qt library type is 'static'

Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas De Schampheleire <[email protected]> writes:

If BR2_PACKAGE_QT_STATIC is set, qtuio will not build a .so file, but .a. However, the custom INSTALL_TARGET_CMDS and INSTALL_STAGING_CMDS unconditionally attempted to copy the .so file.

This commit checks the requested Qt library type and copies the right library for each case, taking into account that the static .a file does not need to be copied to the target directory.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard