1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-12-06 22:46:35 +01:00

Add an option to disable qr codes

This commit is contained in:
François-Xavier Carton
2018-06-16 05:07:16 +02:00
parent 68ce17a57f
commit 46f646afcf
14 changed files with 90 additions and 29 deletions

15
cfg/checks/qr.mk Normal file
View File

@@ -0,0 +1,15 @@
# Variables for QR export support
QR_LIBS = libqrencode
QR_CFLAGS = -DQRCODE
# Check if we can build QR export support
CHECK_QR_LIBS = $(shell pkg-config --exists $(QR_LIBS) || echo -n "error")
ifneq ($(CHECK_QR_LIBS), error)
LIBS += $(QR_LIBS)
CFLAGS += $(QR_CFLAGS)
else ifneq ($(MAKECMDGOALS), clean)
MISSING_QR_LIBS = $(shell for lib in $(QR_LIBS) ; do if ! $(PKG_CONFIG) --exists $$lib ; then echo $$lib ; fi ; done)
$(warning WARNING -- Toxic will be compiled without QR export support)
$(warning WARNING -- You need these libraries for QR export support)
$(warning WARNING -- $(MISSING_QR_LIBS))
endif