xmake.lua 862 B

12345678910111213141516171819202122232425
  1. package("tomlc99")
  2. set_homepage("https://github.com/cktan/tomlc99")
  3. set_description("TOML C library")
  4. set_license("MIT")
  5. add_urls("https://github.com/cktan/tomlc99.git")
  6. add_versions("2023.09.30", "5221b3d3d66c25a1dc6f0372b4f824f1202fe398")
  7. on_install(function (package)
  8. io.writefile("xmake.lua", [[
  9. add_rules("mode.release", "mode.debug")
  10. target("tomlc99")
  11. set_kind("$(kind)")
  12. add_files("toml.c")
  13. add_headerfiles("toml.h")
  14. if is_plat("windows") and is_kind("shared") then
  15. add_rules("utils.symbols.export_all")
  16. end
  17. ]])
  18. import("package.tools.xmake").install(package)
  19. end)
  20. on_test(function (package)
  21. assert(package:has_cfuncs("toml_parse", {includes = "toml.h"}))
  22. end)