2
0

xmake.lua 1010 B

123456789101112131415161718192021222324252627282930
  1. package("rest_rpc")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/qicosmos/rest_rpc")
  4. set_description("c++11, high performance, cross platform, easy to use rpc framework.")
  5. set_license("MIT")
  6. add_urls("https://github.com/qicosmos/rest_rpc.git")
  7. add_versions("2023.6.14", "8782f1d341e1dd18f9fe3a77b8335fd17a5ba585")
  8. add_deps("asio", "msgpack-cxx")
  9. if is_plat("mingw") then
  10. add_syslinks("ws2_32")
  11. end
  12. on_install("windows", "macosx", "linux", "mingw", function (package)
  13. os.cp("include", package:installdir())
  14. end)
  15. on_test(function (package)
  16. assert(package:check_cxxsnippets({test = [[
  17. #include "rest_rpc.hpp"
  18. void test() {
  19. rest_rpc::rpc_client client("127.0.0.1", 9000);
  20. client.connect();
  21. int result = client.call<int>("add", 1, 2);
  22. client.run();
  23. }
  24. ]]}, {configs = {languages = "c++11"}}))
  25. end)