xmake.lua 987 B

1234567891011121314151617181920212223242526272829
  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. add_urls("https://github.com/qicosmos/rest_rpc.git")
  6. add_versions("2023.6.14", "8782f1d341e1dd18f9fe3a77b8335fd17a5ba585")
  7. add_deps("asio", "msgpack-cxx")
  8. if is_plat("mingw") then
  9. add_syslinks("ws2_32")
  10. end
  11. on_install("windows", "macosx", "linux", "mingw", function (package)
  12. os.cp("include", package:installdir())
  13. end)
  14. on_test(function (package)
  15. assert(package:check_cxxsnippets({test = [[
  16. #include "rest_rpc.hpp"
  17. void test() {
  18. rest_rpc::rpc_client client("127.0.0.1", 9000);
  19. client.connect();
  20. int result = client.call<int>("add", 1, 2);
  21. client.run();
  22. }
  23. ]]}, {configs = {languages = "c++11"}}))
  24. end)