cppcodec: add package (#3887)

pull/3893/head
star9029 7 months ago committed by GitHub
parent b30cb9af3d
commit f04c259d49
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 23
      packages/c/cppcodec/xmake.lua

@ -0,0 +1,23 @@
package("cppcodec")
set_kind("library", {headeronly = true})
set_homepage("https://github.com/tplgy/cppcodec")
set_description("Header-only C++11 library to encode/decode base64, base64url, base32, base32hex and hex (a.k.a. base16) as specified in RFC 4648, plus Crockford's base32. MIT licensed with consistent, flexible API.")
set_license("MIT")
add_urls("https://github.com/tplgy/cppcodec.git")
add_versions("2022.09.07", "8019b8b580f8573c33c50372baec7039dfe5a8ce")
on_install(function (package)
os.vcp("cppcodec", package:installdir("include"))
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
#include <cppcodec/base64_rfc4648.hpp>
using base64 = cppcodec::base64_rfc4648;
void test() {
std::vector<uint8_t> decoded = base64::decode("YW55IGNhcm5hbCBwbGVhc3VyZQ==");
}
]]}, {configs = {languages = "c++11"}}))
end)
Loading…
Cancel
Save