xmake.lua 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. package("zpp_bits")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/eyalz800/zpp_bits")
  4. set_description("A lightweight C++20 serialization and RPC library")
  5. set_license("MIT")
  6. add_urls("https://github.com/eyalz800/zpp_bits/archive/refs/tags/$(version).tar.gz",
  7. "https://github.com/eyalz800/zpp_bits.git")
  8. add_versions("v4.5.1", "2589469c86700264e4746b3efb0319b6911f2b9899fbd7cefddb6a01a7001f3b")
  9. add_versions("v4.5", "2ed5058b1394cd79b5130916e6beb275efbfb73f1713ed1d08a7d3ba1b36970e")
  10. add_versions("v4.4.25", "d4afb8cf73aec19686928445e912dbbe8d39bffdac43ea69b4781f145195a09e")
  11. if on_check then
  12. on_check("android", function (package)
  13. local ndk = package:toolchain("ndk"):config("ndkver")
  14. assert(ndk and tonumber(ndk) > 22, "package(zpp_bits) require ndk version > 22")
  15. end)
  16. end
  17. on_install(function (package)
  18. os.vcp("zpp_bits.h", package:installdir("include"))
  19. end)
  20. on_test(function (package)
  21. assert(package:check_cxxsnippets({test = [[
  22. void test() {
  23. auto [data, in, out] = zpp::bits::data_in_out();
  24. }
  25. ]]}, {configs = {languages = "c++20"}, includes = "zpp_bits.h"}))
  26. end)