xmake.lua 914 B

123456789101112131415161718192021
  1. package("dyncall")
  2. set_homepage("https://www.dyncall.org")
  3. set_description("dyncall library provides a clean and portable C interface to dynamically issue calls to foreign code using small call kernels written in assembly.")
  4. add_urls("https://www.dyncall.org/r$(version)/dyncall-$(version).tar.gz")
  5. add_versions("1.4", "14437dbbef3b6dc92483f6507eaf825ab97964a89eecae8cb347a6bec9c32aae")
  6. add_configs("shared", {description = "only has static library.", default = false, type = "boolean", readonly = true})
  7. add_deps("cmake")
  8. on_install("!wasm", function (package)
  9. local configs = {}
  10. table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
  11. import("package.tools.cmake").install(package, configs)
  12. end)
  13. on_test(function (package)
  14. assert(package:has_cfuncs("dcNewCallVM", {includes = "dyncall.h"}))
  15. end)