瀏覽代碼

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.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Thomas De Schampheleire 11 年之前
父節點
當前提交
31d212b3e1
共有 1 個文件被更改,包括 11 次插入2 次删除
  1. 11 2
      package/qtuio/qtuio.mk

+ 11 - 2
package/qtuio/qtuio.mk

@@ -51,13 +51,22 @@ define QTUIO_INSTALL_EXAMPLES
 endef
 endef
 endif
 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
 define QTUIO_INSTALL_TARGET_CMDS
-	cp -dpf $(@D)/lib/libqTUIO.so* $(TARGET_DIR)/usr/lib
+	$(QTUIO_INSTALL_TARGET_LIBRARY)
 	$(QTUIO_INSTALL_EXAMPLES)
 	$(QTUIO_INSTALL_EXAMPLES)
 endef
 endef
 
 
 define QTUIO_INSTALL_STAGING_CMDS
 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
 endef
 
 
 $(eval $(generic-package))
 $(eval $(generic-package))