package/quazip: add option to build/install tests

Signed-off-by: Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Zoltan Gyarmati
2025-11-20 23:08:00 +01:00
committed by Thomas Petazzoni
parent 6f226b2923
commit 53044437c8
2 changed files with 23 additions and 0 deletions

View File

@@ -10,3 +10,14 @@ config BR2_PACKAGE_QUAZIP
archives. It uses the Qt toolkit.
http://quazip.sourceforge.net
if BR2_PACKAGE_QUAZIP
config BR2_PACKAGE_QUAZIP_INSTALL_TESTS
bool "Build tests"
select BR2_PACKAGE_QT6BASE_TEST if BR2_PACKAGE_QT6
select BR2_PACKAGE_QT6BASE_NETWORK if BR2_PACKAGE_QT6
help
Build and install unit test binaries
endif

View File

@@ -16,6 +16,18 @@ ifeq ($(BR2_PACKAGE_QT6BASE),y)
QUAZIP_DEPENDENCIES += qt6base qt6core5compat
endif
ifeq ($(BR2_PACKAGE_QUAZIP_INSTALL_TESTS),y)
QUAZIP_CONF_OPTS += -DQUAZIP_ENABLE_TESTS=ON
define QUAZIP_INSTALL_TESTS
$(INSTALL) -D -m 0755 $(@D)/qztest/qztest $(TARGET_DIR)/usr/bin
endef
QUAZIP_POST_INSTALL_TARGET_HOOKS += QUAZIP_INSTALL_TESTS
else
QUAZIP_CONF_OPTS += -DQUAZIP_ENABLE_TESTS=OFF
endif
QUAZIP_LICENSE = LGPL-2.1
QUAZIP_LICENSE_FILES = COPYING
QUAZIP_CPE_ID_VALID = YES