xmake.lua 907 B

123456789101112131415161718192021222324
  1. package("brynet")
  2. set_homepage("https://github.com/IronsDu/brynet")
  3. set_description("Header Only Cross platform high performance TCP network library using C++ 11")
  4. set_urls("https://github.com/IronsDu/brynet/archive/v$(version).zip")
  5. add_urls("https://github.com/IronsDu/brynet.git")
  6. add_versions("1.0.9", "a264a6aaf3ec9fd5aa4029a8857be813be203ee7b93997b0c1c5c5e2c5f89a2a")
  7. if is_plat("windows") then
  8. add_syslinks("ws2_32")
  9. end
  10. on_install("windows", "linux", "android", "cross", function (package)
  11. os.cp("include", package:installdir())
  12. end)
  13. on_test(function (package)
  14. assert(package:check_cxxsnippets({test = [[
  15. void test(int argc, char** argv) {
  16. auto service = brynet::net::TcpService::Create();
  17. }
  18. ]]}, {configs = {languages = "c++17"}, includes = "brynet/net/TcpService.hpp"}))
  19. end)