add libqrencode (#2935)

* add libqrencode

* Update xmake.lua

---------

Co-authored-by: Your Name <you@example.com>
pull/2939/head
xpxz 12 months ago committed by GitHub
parent 0299481ba1
commit e13d098dd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 21
      packages/l/libqrencode/xmake.lua

@ -0,0 +1,21 @@
package("libqrencode")
set_homepage("https://github.com/fukuchi/libqrencode")
set_description("A fast and compact QR Code encoding library")
set_license("LGPL-2.1")
add_urls("https://github.com/fukuchi/libqrencode/archive/refs/tags/v$(version).zip")
add_versions("4.1.1", "5ebf5f71fefda8e58e713e821f956759b38b9178ce455df7444e17f5c99e1b19")
add_deps("cmake")
add_deps("libpng")
on_install(function (package)
local configs = {"-DWITH_TOOLS=OFF", "-DBUILD_TESTING=OFF"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
import("package.tools.cmake").install(package, configs)
end)
on_test(function (package)
assert(package:has_cfuncs("QRinput_append", {includes = "qrencode.h"}))
end)
Loading…
Cancel
Save