-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcompat.cjson.lua
More file actions
64 lines (62 loc) · 2.66 KB
/
Copy pathcompat.cjson.lua
File metadata and controls
64 lines (62 loc) · 2.66 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
-- Form B inline descriptor for cJSON — an ultralightweight JSON parser in
-- ANSI C. Pure-C source build (same shape as compat.zlib): compile cJSON.c
-- into a lib, expose cJSON.h via include_dirs. The optional cJSON_Utils
-- extension (JSON Pointer / Patch / merge) is gated behind the `utils`
-- feature, mirroring how compat.gtest gates gtest_main behind `main`:
-- listed under features only, so it is excluded by default and pulled in
-- when `features = ["utils"]` is requested on the dependency.
--
-- All `mcpp` paths are GLOBS relative to the verdir; the leading `*/`
-- absorbs the GitHub tarball's `cJSON-<tag>/` wrap layer.
package = {
spec = "1",
namespace = "compat",
name = "compat.cjson",
description = "Ultralightweight JSON parser in ANSI C",
licenses = {"MIT"},
repo = "https://github.com/DaveGamble/cJSON",
type = "package",
xpm = {
linux = {
["1.7.19"] = {
url = {
GLOBAL = "https://github.com/DaveGamble/cJSON/archive/refs/tags/v1.7.19.tar.gz",
CN = "https://gitcode.com/mcpp-res/cjson/releases/download/1.7.19/cjson-1.7.19.tar.gz",
},
sha256 = "7fa616e3046edfa7a28a32d5f9eacfd23f92900fe1f8ccd988c1662f30454562",
},
},
macosx = {
["1.7.19"] = {
url = {
GLOBAL = "https://github.com/DaveGamble/cJSON/archive/refs/tags/v1.7.19.tar.gz",
CN = "https://gitcode.com/mcpp-res/cjson/releases/download/1.7.19/cjson-1.7.19.tar.gz",
},
sha256 = "7fa616e3046edfa7a28a32d5f9eacfd23f92900fe1f8ccd988c1662f30454562",
},
},
windows = {
["1.7.19"] = {
url = {
GLOBAL = "https://github.com/DaveGamble/cJSON/archive/refs/tags/v1.7.19.tar.gz",
CN = "https://gitcode.com/mcpp-res/cjson/releases/download/1.7.19/cjson-1.7.19.tar.gz",
},
sha256 = "7fa616e3046edfa7a28a32d5f9eacfd23f92900fe1f8ccd988c1662f30454562",
},
},
},
mcpp = {
language = "c++23",
import_std = false,
c_standard = "c99",
include_dirs = { "*" },
sources = { "*/cJSON.c" },
targets = { ["cjson"] = { kind = "lib" } },
-- cJSON_Utils is an optional extension; excluded by default, pulled in
-- only when `features = ["utils"]` is requested on the dependency.
features = {
["utils"] = { sources = { "*/cJSON_Utils.c" } },
},
deps = { },
},
}