xmake.lua 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. package("wfrest")
  2. set_homepage("https://github.com/wfrest/wfrest")
  3. set_description("C++ Web Framework REST API")
  4. set_license("Apache-2.0")
  5. add_urls("https://github.com/wfrest/wfrest/archive/refs/tags/$(version).tar.gz",
  6. "https://github.com/wfrest/wfrest.git")
  7. add_versions("v0.9.3", "1bd0047484e81e23c7a8ab7ba41634109169c37d80aeb2c480728214db42878e")
  8. add_versions("v0.9.4", "1f8811e90e6c89af91db04cab0c37dc86cf4777f4f4713d6003ac0ec1a2471a9")
  9. add_versions("v0.9.5", "46e4957a5c00c95c85979bbc41807b4c4f2aacc11c43e123039ce440ebecab84")
  10. add_versions("v0.9.6", "8199e79d8703ad7e8b3c6e546395fb8f0adc302ca1d02b654fd91edb31416854")
  11. add_deps("openssl", "workflow", "zlib")
  12. if is_plat("linux") then
  13. add_syslinks("pthread", "dl")
  14. end
  15. on_install("linux", "macosx", "android", function (package)
  16. local configs = {}
  17. if package:config("shared") then
  18. configs.kind = "shared"
  19. end
  20. import("package.tools.xmake").install(package, configs)
  21. end)
  22. on_test(function (package)
  23. assert(package:check_cxxsnippets({test = [[
  24. #include "wfrest/HttpServer.h"
  25. void test() {
  26. wfrest::HttpServer svr;
  27. if (svr.start(8888) == 0)
  28. {
  29. svr.stop();
  30. }
  31. }
  32. ]]}, {configs = {languages = "c++11"}}))
  33. end)