xmake.lua 979 B

12345678910111213141516171819202122232425
  1. package("minilzo")
  2. set_homepage("http://www.oberhumer.com/opensource/lzo/#minilzo")
  3. set_description("A very lightweight subset of the LZO library intended for easy inclusion with your application")
  4. add_urls("http://www.oberhumer.com/opensource/lzo/download/minilzo-$(version).tar.gz")
  5. add_versions("2.10", "eb4ce543aad19533c83550746e0e9d7bcf716b35a42429e3ba17d60fa0f3e47a")
  6. on_install(function (package)
  7. local configs = {}
  8. io.writefile("xmake.lua", [[
  9. add_rules("mode.release", "mode.debug")
  10. target("minilzo")
  11. set_kind("$(kind)")
  12. add_files("minilzo.c")
  13. add_headerfiles("*.h")
  14. ]])
  15. if package:config("shared") then
  16. configs.kind = "shared"
  17. end
  18. import("package.tools.xmake").install(package, configs)
  19. end)
  20. on_test(function (package)
  21. assert(package:has_cfuncs("lzo1x_1_compress", {includes = "minilzo.h"}))
  22. end)