xmake.lua 1.1 KB

1234567891011121314151617181920212223242526272829
  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.4.25", "d4afb8cf73aec19686928445e912dbbe8d39bffdac43ea69b4781f145195a09e")
  9. if on_check then
  10. on_check("android", function (package)
  11. local ndk = package:toolchain("ndk"):config("ndkver")
  12. assert(ndk and tonumber(ndk) > 22, "package(zpp_bits) require ndk version > 22")
  13. end)
  14. end
  15. on_install(function (package)
  16. os.vcp("zpp_bits.h", package:installdir("include"))
  17. end)
  18. on_test(function (package)
  19. assert(package:check_cxxsnippets({test = [[
  20. void test() {
  21. auto [data, in, out] = zpp::bits::data_in_out();
  22. }
  23. ]]}, {configs = {languages = "c++20"}, includes = "zpp_bits.h"}))
  24. end)