zpp_bits: add package (#5740)

* zpp_bits: add package

* add check
pull/5635/merge
star9029 2 weeks ago committed by GitHub
parent e7ff876785
commit 42899977cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 29
      packages/z/zpp_bits/xmake.lua

@ -0,0 +1,29 @@
package("zpp_bits")
set_kind("library", {headeronly = true})
set_homepage("https://github.com/eyalz800/zpp_bits")
set_description("A lightweight C++20 serialization and RPC library")
set_license("MIT")
add_urls("https://github.com/eyalz800/zpp_bits/archive/refs/tags/$(version).tar.gz",
"https://github.com/eyalz800/zpp_bits.git")
add_versions("v4.4.25", "d4afb8cf73aec19686928445e912dbbe8d39bffdac43ea69b4781f145195a09e")
if on_check then
on_check("android", function (package)
local ndk = package:toolchain("ndk"):config("ndkver")
assert(ndk and tonumber(ndk) > 22, "package(zpp_bits) require ndk version > 22")
end)
end
on_install(function (package)
os.vcp("zpp_bits.h", package:installdir("include"))
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
void test() {
auto [data, in, out] = zpp::bits::data_in_out();
}
]]}, {configs = {languages = "c++20"}, includes = "zpp_bits.h"}))
end)
Loading…
Cancel
Save