xmake.lua 1.1 KB

1234567891011121314151617181920212223242526272829303132
  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_versions("2024.7.26", "35761edb55dff9ccdc87000062e84172bbd5b29b")
  9. add_deps("asio 1.32.0")
  10. add_deps("msgpack-cxx", {configs = {boost = false}})
  11. if is_plat("mingw") then
  12. add_syslinks("ws2_32")
  13. end
  14. on_install("windows", "macosx", "linux", "mingw", function (package)
  15. os.cp("include", package:installdir())
  16. end)
  17. on_test(function (package)
  18. assert(package:check_cxxsnippets({test = [[
  19. #include "rest_rpc.hpp"
  20. void test() {
  21. rest_rpc::rpc_client client("127.0.0.1", 9000);
  22. client.connect();
  23. int result = client.call<int>("add", 1, 2);
  24. client.run();
  25. }
  26. ]]}, {configs = {languages = "c++11"}}))
  27. end)