summaryrefslogtreecommitdiffstats
path: root/src/libqrencode.mk
diff options
context:
space:
mode:
authorTony Theodore <tonyt@logyst.com>2017-10-31 05:59:33 (GMT)
committerTony Theodore <tonyt@logyst.com>2017-10-31 06:02:42 (GMT)
commita9982192ff679f20bfc8f0038eb252339d017f3a (patch)
treef2accee59e42a8b9cbe318a6171970504ebbf3ec /src/libqrencode.mk
parent8ad7be0160d3f3d541d7901d6fbd7e1efa095f21 (diff)
downloadmxe-a9982192ff679f20bfc8f0038eb252339d017f3a.zip
mxe-a9982192ff679f20bfc8f0038eb252339d017f3a.tar.gz
mxe-a9982192ff679f20bfc8f0038eb252339d017f3a.tar.bz2
qrencode: rename to libqrencode, update, and switch to cmake
- autotools build didn't produce shared libs - libpng and sdl are only required for tools/tests - build test using supplied pkg-config file
Diffstat (limited to 'src/libqrencode.mk')
-rw-r--r--src/libqrencode.mk25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/libqrencode.mk b/src/libqrencode.mk
new file mode 100644
index 0000000..0cf4632
--- /dev/null
+++ b/src/libqrencode.mk
@@ -0,0 +1,25 @@
+# This file is part of MXE. See LICENSE.md for licensing information.
+
+PKG := libqrencode
+$(PKG)_WEBSITE := https://fukuchi.org/works/qrencode/
+$(PKG)_DESCR := a fast and compact QR Code encoding library
+$(PKG)_IGNORE :=
+$(PKG)_VERSION := 4.0.0
+$(PKG)_CHECKSUM := c2c8a8110354463a3332cb48abf8581c8d94136af4dc1418f891cc9c7719e3c1
+$(PKG)_GH_CONF := fukuchi/libqrencode,v
+$(PKG)_DEPS := gcc pthreads
+
+define $(PKG)_BUILD
+ # build and install the library
+ cd '$(BUILD_DIR)' && $(TARGET)-cmake '$(SOURCE_DIR)' \
+ -DWITH_TESTS=OFF \
+ -DWITH_TOOLS=OFF
+ $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)'
+ $(MAKE) -C '$(BUILD_DIR)' -j 1 install
+
+ # compile test
+ '$(TARGET)-gcc' \
+ -W -Wall -pedantic \
+ '$(SOURCE_DIR)/tests/prof_qrencode.c' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \
+ `'$(TARGET)-pkg-config' $(PKG) --cflags --libs`
+endef