xmake.lua 982 B

12345678910111213141516171819202122232425
  1. package("asio2")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/zhllxt/asio2")
  4. set_description("Header only c++ network library, based on asio, support tcp,udp,http,websocket,rpc,ssl,icmp,serial_port.")
  5. set_license("BSL-1.0")
  6. add_urls("https://github.com/zhllxt/asio2.git")
  7. add_versions("2023.05.09", "ac8c79964d79020091e38fcbb4ae9dccccb3b03c")
  8. add_deps("asio", "cereal", "fmt", "openssl3")
  9. add_deps("spdlog", { configs = { header_only = false, fmt_external = true } })
  10. on_install("windows", "linux", "macosx", "mingw", "bsd", function (package)
  11. os.cp(path.join("include", "*"), package:installdir("include"))
  12. end)
  13. on_test(function (package)
  14. assert(package:check_cxxsnippets({test = [[
  15. #include <asio2/asio2.hpp>
  16. void test() {
  17. asio2::tcp_server server;
  18. }
  19. ]]}, {configs = {languages = "c++17"}}))
  20. end)