xmake.lua 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. package("wfrest")
  2. set_homepage("https://github.com/wfrest/wfrest")
  3. set_description("wfrest: 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_deps("openssl", "workflow", "zlib")
  11. if is_plat("linux") then
  12. add_syslinks("pthread", "dl")
  13. end
  14. on_install("linux", "macosx", "android", function (package)
  15. local configs = {}
  16. if package:config("shared") then
  17. configs.kind = "shared"
  18. end
  19. import("package.tools.xmake").install(package, configs)
  20. end)
  21. on_test(function (package)
  22. assert(package:check_cxxsnippets({test = [[
  23. #include "wfrest/HttpServer.h"
  24. void test() {
  25. wfrest::HttpServer svr;
  26. if (svr.start(8888) == 0)
  27. {
  28. svr.stop();
  29. }
  30. }
  31. ]]}, {configs = {languages = "c++11"}}))
  32. end)