xmake.lua 978 B

1234567891011121314151617181920212223
  1. package("cppcodec")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/tplgy/cppcodec")
  4. 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.")
  5. set_license("MIT")
  6. add_urls("https://github.com/tplgy/cppcodec.git")
  7. add_versions("2022.09.07", "8019b8b580f8573c33c50372baec7039dfe5a8ce")
  8. on_install(function (package)
  9. os.vcp("cppcodec", package:installdir("include"))
  10. end)
  11. on_test(function (package)
  12. assert(package:check_cxxsnippets({test = [[
  13. #include <cppcodec/base64_rfc4648.hpp>
  14. using base64 = cppcodec::base64_rfc4648;
  15. void test() {
  16. std::vector<uint8_t> decoded = base64::decode("YW55IGNhcm5hbCBwbGVhc3VyZQ==");
  17. }
  18. ]]}, {configs = {languages = "c++11"}}))
  19. end)