-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathcompat.zlib.lua
More file actions
79 lines (77 loc) · 2.9 KB
/
Copy pathcompat.zlib.lua
File metadata and controls
79 lines (77 loc) · 2.9 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
package = {
spec = "1",
namespace = "compat",
name = "zlib",
description = "A compression library",
licenses = {"Zlib"},
repo = "https://github.com/madler/zlib",
type = "package",
xpm = {
linux = {
["1.3.2"] = {
url = {
GLOBAL = "https://github.com/madler/zlib/archive/refs/tags/v1.3.2.tar.gz",
CN = "https://gitcode.com/mcpp-res/zlib/releases/download/1.3.2/zlib-1.3.2.tar.gz",
},
sha256 = "b99a0b86c0ba9360ec7e78c4f1e43b1cbdf1e6936c8fa0f6835c0cd694a495a1",
},
},
macosx = {
["1.3.2"] = {
url = {
GLOBAL = "https://github.com/madler/zlib/archive/refs/tags/v1.3.2.tar.gz",
CN = "https://gitcode.com/mcpp-res/zlib/releases/download/1.3.2/zlib-1.3.2.tar.gz",
},
sha256 = "b99a0b86c0ba9360ec7e78c4f1e43b1cbdf1e6936c8fa0f6835c0cd694a495a1",
},
},
windows = {
["1.3.2"] = {
url = {
GLOBAL = "https://github.com/madler/zlib/archive/refs/tags/v1.3.2.tar.gz",
CN = "https://gitcode.com/mcpp-res/zlib/releases/download/1.3.2/zlib-1.3.2.tar.gz",
},
sha256 = "b99a0b86c0ba9360ec7e78c4f1e43b1cbdf1e6936c8fa0f6835c0cd694a495a1",
},
},
},
mcpp = {
language = "c++23",
import_std = false,
c_standard = "c11",
include_dirs = {"*", "mcpp_generated/include"},
-- Both of these are GCC/Clang-only and used to be unconditional.
-- `-include` is the worse of the two on MSVC: cl does not reject it, it
-- warns (`D9002 ignoring unknown option`) and carries on, so the config
-- header was silently never included. The header only defines anything
-- when _WIN32 is absent, so Windows needs neither.
linux = {
cflags = { "-D_GNU_SOURCE", "-include", "mcpp_zlib_config.h" },
},
macosx = {
cflags = { "-include", "mcpp_zlib_config.h" },
},
generated_files = {
["mcpp_generated/include/mcpp_zlib_config.h"] = "#ifndef MCPP_ZLIB_CONFIG_H\n#define MCPP_ZLIB_CONFIG_H\n#if !defined(_WIN32)\n#define Z_HAVE_UNISTD_H 1\n#endif\n#endif\n",
},
sources = {
"*/adler32.c",
"*/compress.c",
"*/crc32.c",
"*/deflate.c",
"*/gzclose.c",
"*/gzlib.c",
"*/gzread.c",
"*/gzwrite.c",
"*/inflate.c",
"*/infback.c",
"*/inftrees.c",
"*/inffast.c",
"*/trees.c",
"*/uncompr.c",
"*/zutil.c",
},
targets = { ["zlib"] = { kind = "lib" } },
deps = {},
},
}