Merge branch 'nohea-qrencode-add'

This commit is contained in:
Tony Theodore 2017-10-31 17:06:05 +11:00
commit ba02f4234f
2 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,26 @@
This file is part of MXE. See LICENSE.md for licensing information.
Contains ad hoc patches for cross building.
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tony Theodore <tonyt@logyst.com>
Date: Tue, 31 Oct 2017 16:56:24 +1100
Subject: [PATCH] install *.dll to bin
taken from:
https://github.com/fukuchi/libqrencode/issues/112
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1111111..2222222 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -120,7 +120,8 @@ configure_file(libqrencode.pc.in libqrencode.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qrencode.1 DESTINATION share/man/man1)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libqrencode.pc DESTINATION lib/pkgconfig)
install(FILES qrencode.h DESTINATION include)
-install(TARGETS qrencode DESTINATION lib)
+install(TARGETS qrencode DESTINATION lib
+ RUNTIME DESTINATION bin)
## Build utility tools
if(WITH_TOOLS AND TARGET PNG::PNG)

25
src/libqrencode.mk Normal file
View File

@ -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