1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
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)
|