mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-19 16:40:46 -09:00
By default, qextserialport will attempt to build a shared library. qesp_static has to be set in CONFIG to build static. Note that static+shared is not supported, in that case we just build shared. The install target commands also have to be gated in that case, because the *.so files don't exist. For completeness we both set QEXTSERIALPORT_INSTALL_STAGING to NO and don't define QEXTSERIALPORT_INSTALL_TARGET_CMDS for static builds, although one of them would be sufficient. Fixes: http://autobuild.buildroot.net/results/c9233ad71fd60d0e6a85731a8bd4e598bd84947a Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
48 lines
1.3 KiB
Makefile
48 lines
1.3 KiB
Makefile
################################################################################
|
|
#
|
|
# qextserialport
|
|
#
|
|
################################################################################
|
|
|
|
QEXTSERIALPORT_VERSION = ada321a9ee463f628e7b781b8ed00ff219152158
|
|
QEXTSERIALPORT_SITE = $(call github,qextserialport,qextserialport,$(QEXTSERIALPORT_VERSION))
|
|
QEXTSERIALPORT_LICENSE = MIT
|
|
QEXTSERIALPORT_LICENSE_FILES = LICENSE.md
|
|
QEXTSERIALPORT_INSTALL_STAGING = YES
|
|
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
|
QEXTSERIALPORT_CONF_OPTS += CONFIG+=qesp_static
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_QT),y)
|
|
QEXTSERIALPORT_DEPENDENCIES += qt
|
|
QEXTSERIALPORT_QMAKE = $(QT_QMAKE)
|
|
else ifeq ($(BR2_PACKAGE_QT5),y)
|
|
QEXTSERIALPORT_DEPENDENCIES += qt5base
|
|
QEXTSERIALPORT_QMAKE = $(QT5_QMAKE)
|
|
endif
|
|
|
|
define QEXTSERIALPORT_CONFIGURE_CMDS
|
|
cd $(@D); $(TARGET_MAKE_ENV) $(QEXTSERIALPORT_QMAKE) $(QEXTSERIALPORT_CONF_OPTS)
|
|
endef
|
|
|
|
define QEXTSERIALPORT_BUILD_CMDS
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
|
|
endef
|
|
|
|
define QEXTSERIALPORT_INSTALL_STAGING_CMDS
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
|
|
cp $(@D)/src/QExtSerialPort $(STAGING_DIR)/usr/include/QtExtSerialPort/
|
|
cp $(@D)/qextserialport.pc $(STAGING_DIR)/usr/lib/pkgconfig/
|
|
endef
|
|
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
|
QEXTSERIALPORT_INSTALL_STAGING = NO
|
|
else
|
|
define QEXTSERIALPORT_INSTALL_TARGET_CMDS
|
|
cp -a $(@D)/*.so.* $(TARGET_DIR)/usr/lib
|
|
endef
|
|
endif
|
|
|
|
$(eval $(generic-package))
|