xmake.lua 1.0 KB

12345678910111213141516171819202122232425
  1. package("mallocvis")
  2. set_homepage("https://github.com/archibate/mallocvis")
  3. set_description("allocation visualization in svg graph")
  4. add_urls("https://github.com/archibate/mallocvis.git")
  5. add_versions("2024.07.17", "371e8dc21fec00adf2b45d7c7bb1b7cce8ac75ff")
  6. add_patches("2024.07.17", "patches/2024.07.17/fix-build-mingw-bsd.diff", "7379a1a451fb0a69462efda693bab8b2342cfbdb18eb5e791bca4cc50e36ae38")
  7. if is_plat("windows", "mingw") then
  8. add_syslinks("dbghelp")
  9. elseif is_plat("linux") then
  10. add_syslinks("pthread")
  11. elseif is_plat("bsd") then
  12. add_syslinks("pthread", "execinfo")
  13. end
  14. on_install("!android and !wasm and !macosx and !iphoneos", function (package)
  15. os.cp(path.join(package:scriptdir(), "port", "xmake.lua"), "xmake.lua")
  16. import("package.tools.xmake").install(package)
  17. end)
  18. on_test(function (package)
  19. assert(package:has_cxxfuncs("addr2sym", {configs = {languages = "c++17"}, includes = "addr2sym.hpp"}))
  20. end)