improve has_cfuns

pull/13/head
ruki 6 years ago
parent 04ea06ab68
commit 7c9c85efe8
No known key found for this signature in database
GPG Key ID: 33341DF9719963FA
  1. 12
      packages/l/libpng/xmake.lua
  2. 4
      packages/l/libxml2/xmake.lua

@ -13,7 +13,13 @@ package("libpng")
add_deps("cmake")
end
add_links("png")
on_load(function (package)
if package:plat() == "windows" then
package:add("links", "libpng16_static")
else
package:add("links", "png")
end
end)
on_install("windows", function (package)
import("package.tools.cmake").install(package)
@ -22,3 +28,7 @@ package("libpng")
on_install("macosx", "linux", function (package)
import("package.tools.autoconf").install(package)
end)
on_test(function (package)
assert(package:has_cfuncs("png_create_read_struct", {includes = "png.h"}))
end)

@ -27,3 +27,7 @@ package("libxml2")
on_install("macosx", "linux", function (package)
import("package.tools.autoconf").install(package, {"--disable-dependency-tracking", "--without-python", "--without-lzma"})
end)
on_test(function (package)
assert(import("lib.detect.has_cfuncs")("xmlNewNode", {configs = package:fetch(), includes = {"libxml/parser.h", "libxml/tree.h"}}))
end)

Loading…
Cancel
Save