Add ext sources for glib/libffi (#784)

pull/790/head
Kelvin Zhang 3 years ago committed by GitHub
parent 5f08baf542
commit bf625027f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      packages/g/glib/xmake.lua
  2. 3
      packages/l/libffi/xmake.lua

@ -26,15 +26,17 @@ package("glib")
if is_plat("macosx") then
add_syslinks("iconv")
add_frameworks("Foundation", "CoreFoundation")
add_extsources("brew::glib")
elseif is_plat("linux") then
add_syslinks("pthread", "dl")
add_extsources("apt::libglib2.0-dev")
end
if on_fetch then
on_fetch("macosx", "linux", function (package, opt)
if opt.system and package.find_package then
local result
for _, name in ipairs({"gobject-2.0", "glib-2.0"}) do
for _, name in ipairs({"gobject-2.0", "glib-2.0", "gio-2.0", "gmodule-2.0", "gthread-2.0"}) do
local pkginfo = package.find_package and package:find_package("pkgconfig::" .. name, opt)
if pkginfo then
if not result then

@ -11,8 +11,11 @@ package("libffi")
if is_plat("linux") then
add_extsources("apt::libffi-dev")
elseif is_plat("macosx") then
add_extsources("brew::libffi")
end
on_load("macosx", "linux", "iphoneos", function (package)
if package:gitref() then
package:add("deps", "autoconf", "automake", "libtool")

Loading…
Cancel
Save