xmake.lua 1.0 KB

1234567891011121314151617181920212223242526
  1. package("haclog")
  2. set_homepage("https://github.com/MuggleWei/haclog")
  3. set_description("Haclog(Happy Aync C log) is an extremely fast plain C logging library")
  4. set_license("MIT")
  5. add_urls("https://github.com/MuggleWei/haclog/archive/refs/tags/$(version).tar.gz",
  6. "https://github.com/MuggleWei/haclog.git")
  7. add_versions("v0.0.5", "789340ba87ac076e4c5559e1e6e0bf4f1e17f2e55c4845d0f9fc8ead8e6d7f5f")
  8. if is_plat("linux", "bsd") then
  9. add_syslinks("pthread")
  10. end
  11. add_deps("cmake")
  12. on_install("windows", "linux", "macosx", "android", "cross", function (package)
  13. local configs = {}
  14. table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
  15. table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
  16. import("package.tools.cmake").install(package, configs)
  17. end)
  18. on_test(function (package)
  19. assert(package:has_cfuncs("haclog_console_handler_init", {includes = "haclog/haclog.h"}))
  20. end)