47078cc118
The patch allows you to choose whether to build encoding (BUILD_WRITERS), decoding (BUILD_READERS) or both. At least one of the two options must be enabled. This way, it's possible to keep the library size at minimum. By default, to ensure backward compatibility, both are compiled. Co-Developed-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Co-Developed-by: Francesco Nicoletta Puzzillo <francesco.nicolettap@amarulasolutions.com> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
42 lines
1.2 KiB
Makefile
42 lines
1.2 KiB
Makefile
################################################################################
|
|
#
|
|
# zxing-cpp
|
|
#
|
|
################################################################################
|
|
|
|
ZXING_CPP_VERSION = 2.1.0
|
|
ZXING_CPP_SITE = $(call github,zxing-cpp,zxing-cpp,v$(ZXING_CPP_VERSION))
|
|
ZXING_CPP_LICENSE = Apache-2.0
|
|
ZXING_CPP_LICENSE_FILES = LICENSE
|
|
ZXING_CPP_INSTALL_STAGING = YES
|
|
ZXING_CPP_SUPPORTS_IN_SOURCE_BUILD = NO
|
|
ZXING_CPP_DEPENDENCIES = host-pkgconf stb
|
|
ZXING_CPP_CONF_OPTS = \
|
|
-DBUILD_BLACKBOX_TESTS=OFF \
|
|
-DBUILD_UNIT_TESTS=OFF \
|
|
-DBUILD_DEPENDENCIES=LOCAL
|
|
|
|
ifeq ($(BR2_PACKAGE_PYTHON3)$(BR2_PACKAGE_PYTHON_PYBIND),yy)
|
|
ZXING_CPP_DEPENDENCIES += python3 python-pybind
|
|
ZXING_CPP_CONF_OPTS += \
|
|
-DBUILD_PYTHON_MODULE=ON \
|
|
-DPYTHON_EXECUTABLE=$(HOST_DIR)/bin/python3 \
|
|
-DPYTHON_INCLUDE_DIRS=$(STAGING_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR)
|
|
else
|
|
ZXING_CPP_CONF_OPTS += -DBUILD_PYTHON_MODULE=OFF
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_ZXING_CPP_READERS),y)
|
|
ZXING_CPP_CONF_OPTS += -DBUILD_READERS=ON
|
|
else
|
|
ZXING_CPP_CONF_OPTS += -DBUILD_READERS=OFF
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_ZXING_CPP_WRITERS),y)
|
|
ZXING_CPP_CONF_OPTS += -DBUILD_WRITERS=ON
|
|
else
|
|
ZXING_CPP_CONF_OPTS += -DBUILD_WRITERS=OFF
|
|
endif
|
|
|
|
$(eval $(cmake-package))
|