xmake.lua 911 B

1234567891011121314151617181920212223242526
  1. package("tiny-aes-c")
  2. set_homepage("https://github.com/kokke/tiny-AES-c")
  3. set_description("Small portable AES128/192/256 in C")
  4. set_license("Unlicense")
  5. add_urls("https://github.com/kokke/tiny-AES-c.git")
  6. add_versions("2021.12.22", "f06ac37fc31dfdaca2e0d9bec83f90d5663c319b")
  7. on_install(function (package)
  8. io.writefile("xmake.lua", [[
  9. add_rules("mode.debug", "mode.release")
  10. target("tiny-aes-c")
  11. set_kind("$(kind)")
  12. add_files("aes.c")
  13. add_headerfiles("aes.h", "aes.hpp")
  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("AES_init_ctx", {includes = "aes.h"}))
  22. end)