zbar: add support for windows and ios (#5656)

* zbar: add support for windows and ios

* Dummy commit
pull/5660/head
Doekin 4 weeks ago committed by GitHub
parent 978015f8b3
commit 5d9ddf0dd2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      packages/z/zbar/port/xmake.lua
  2. 8
      packages/z/zbar/xmake.lua

@ -40,6 +40,11 @@ target("zbar")
if is_plat("linux", "bsd") then
add_syslinks("pthread")
elseif is_plat("windows") then
add_syslinks("winmm")
if is_kind("shared") then
add_rules("utils.symbols.export_all")
end
end
add_packages("libiconv")

@ -19,17 +19,21 @@ package("zbar")
if is_plat("linux", "bsd") then
add_syslinks("pthread")
elseif is_plat("windows") then
add_syslinks("winmm")
end
add_deps("libiconv")
on_install("!iphoneos and !windows", function (package)
on_install(function (package)
os.cp(path.join(package:scriptdir(), "port", "config.h.in"), "include/config.h.in")
io.gsub("include/config.h.in", "# ?undef (.-)\n", "${define %1}\n")
os.cp(path.join(package:scriptdir(), "port", "xmake.lua"), "xmake.lua")
io.replace("zbar/processor.h", "#include <unistd.h>", "", {plain = true})
local configs = { vers = package:version_str(),
symbologies = table.concat(package:config("symbologies"), ",") }
symbologies = table.concat(package:config("symbologies"), ",")}
-- get LIB_VERSION from configure.ac
-- format: AC_SUBST([LIB_VERSION], [3:0:3])

Loading…
Cancel
Save