qt5base: support static library building
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 7 Apr 2013 09:57:16 +0000 (09:57 +0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Thu, 11 Apr 2013 14:10:51 +0000 (16:10 +0200)
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/qt5/qt5base/qt5base.mk

index d22ab66f37456025c259374144abfd0243a5b2a9..0d0fb117772981fd1db6229d2e49add7f67a24bd 100644 (file)
@@ -37,6 +37,14 @@ else
 QT5BASE_CONFIGURE_OPTS += -release
 endif
 
+ifeq ($(BR2_PREFER_STATIC_LIB),y)
+QT5BASE_CONFIGURE_OPTS += -static
+else
+# We apparently can't build both the shared and static variants of the
+# library.
+QT5BASE_CONFIGURE_OPTS += -shared
+endif
+
 ifeq ($(BR2_LARGEFILE),y)
 QT5BASE_CONFIGURE_OPTS += -largefile
 else
@@ -179,10 +187,16 @@ define QT5BASE_INSTALL_TARGET_FONTS
        fi
 endef
 
+ifeq ($(BR2_PREFER_STATIC_LIB),y)
+define QT5BASE_INSTALL_TARGET_CMDS
+       $(QT5BASE_INSTALL_TARGET_FONTS)
+endef
+else
 define QT5BASE_INSTALL_TARGET_CMDS
        $(QT5BASE_INSTALL_TARGET_LIBS)
        $(QT5BASE_INSTALL_TARGET_PLUGINS)
        $(QT5BASE_INSTALL_TARGET_FONTS)
 endef
+endif
 
 $(eval $(generic-package))