xmake.lua 1.1 KB

1234567891011121314151617181920212223242526272829
  1. package("crypto-algorithms")
  2. set_homepage("https://github.com/KorewaWatchful/crypto-algorithms")
  3. set_description("Basic implementations of standard cryptography algorithms, like AES and SHA-1.")
  4. add_urls("https://github.com/KorewaWatchful/crypto-algorithms.git")
  5. add_versions("2020.4.20", "cb9ea3fada60f9b01e9133d7db4d3e08171d0565")
  6. on_install(function (package)
  7. local configs = {}
  8. io.writefile("xmake.lua", [[
  9. add_rules("mode.debug", "mode.release")
  10. target("crypto-algorithms")
  11. set_kind("$(kind)")
  12. add_files("*.c")
  13. remove_files("*_test.c")
  14. add_headerfiles("*.h")
  15. if is_plat("windows") and is_kind("shared") then
  16. add_rules("utils.symbols.export_all")
  17. end
  18. ]])
  19. if package:config("shared") then
  20. configs.kind = "shared"
  21. end
  22. import("package.tools.xmake").install(package, configs)
  23. end)
  24. on_test(function (package)
  25. assert(package:has_cfuncs("base64_encode", {includes = "base64.h"}))
  26. end)