qextserialport: allow building with Qt5
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 1 Nov 2014 22:15:11 +0000 (23:15 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Mon, 3 Nov 2014 22:06:23 +0000 (23:06 +0100)
qextserialport builds fine with both Qt4 and Qt5, so this commit
enables it for Qt5.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/qextserialport/Config.in
package/qextserialport/qextserialport.mk

index 4e92ecf3bbe45aab1b72cc8d7f66dd61f8bacc27..ab05920b203bbb97a9db9cab1851727c4c034bdd 100644 (file)
@@ -1,8 +1,6 @@
 config BR2_PACKAGE_QEXTSERIALPORT
        bool "qextserialport"
-       # Qt is a big library, we don't want to select it
-       # automatically without the user knowing
-       depends on BR2_PACKAGE_QT
+       depends on BR2_PACKAGE_QT || BR2_PACKAGE_QT5
        help
          A Qt library to manage serial ports
 
index 85abe19e20924acdb1043c8f94646ad1a8538f9c..2949da98cd1900ff2fa7742020a46cfbe2d058c6 100644 (file)
@@ -10,13 +10,19 @@ QEXTSERIALPORT_SITE_METHOD = git
 
 QEXTSERIALPORT_LICENSE = MIT
 
-QEXTSERIALPORT_DEPENDENCIES = qt
-
 QEXTSERIALPORT_INSTALL_STAGING = YES
 
+ifeq ($(BR2_PACKAGE_QT),y)
+QEXTSERIALPORT_DEPENDENCIES += qt
 define QEXTSERIALPORT_CONFIGURE_CMDS
        (cd $(@D); $(TARGET_MAKE_ENV) $(QT_QMAKE))
 endef
+else ifeq ($(BR2_PACKAGE_QT5),y)
+QEXTSERIALPORT_DEPENDENCIES += qt5base
+define QEXTSERIALPORT_CONFIGURE_CMDS
+       (cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE))
+endef
+endif
 
 define QEXTSERIALPORT_BUILD_CMDS
        $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)