package("json11") set_description("json11 is a tiny JSON library for C++11, providing JSON parsing and serialization.") set_license("MIT") add_urls("https://github.com/dropbox/json11/archive/refs/tags/$(version).tar.gz", "https://github.com/dropbox/json11.git") add_versions("v1.0.0", "bab960eebc084d26aaf117b8b8809aecec1e86e371a173655b7dffb49383b0bf") on_install("windows", "linux", "macosx", "bsd", "mingw|x86_64", "android", "iphoneos", "cross", function (package) local configs = {} io.writefile("xmake.lua", [[ add_rules("mode.release", "mode.debug") target("json11") set_kind("$(kind)") set_languages("cxx20") add_files("json11.cpp") add_headerfiles("json11.hpp") ]]) if package:config("shared") then configs.kind = "shared" end import("package.tools.xmake").install(package, configs) end) on_test(function (package) -- assert(package:has_cfuncs("blake3_hasher_init", {includes = "blake3.h"})) end)