summaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorGravatar Jose Colon Rodriguez2024-02-27 09:26:40 -0400
committerGravatar Jose Colon Rodriguez2024-02-27 09:26:40 -0400
commit32c68059a05dde8a57a330db6d14a32506081516 (patch)
treec2b3b9bbbf48330db3570135d371cb92b552f1cb /build.zig
parentUsing NormData nfkd (diff)
downloadzg-32c68059a05dde8a57a330db6d14a32506081516.tar.gz
zg-32c68059a05dde8a57a330db6d14a32506081516.tar.xz
zg-32c68059a05dde8a57a330db6d14a32506081516.zip
Using HangulData in NormData
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig19
1 files changed, 18 insertions, 1 deletions
diff --git a/build.zig b/build.zig
index fa3660e..ee57466 100644
--- a/build.zig
+++ b/build.zig
@@ -52,6 +52,15 @@ pub fn build(b: *std.Build) void {
52 const run_compat_gen_exe = b.addRunArtifact(compat_gen_exe); 52 const run_compat_gen_exe = b.addRunArtifact(compat_gen_exe);
53 const compat_gen_out = run_compat_gen_exe.addOutputFileArg("compat.bin.z"); 53 const compat_gen_out = run_compat_gen_exe.addOutputFileArg("compat.bin.z");
54 54
55 const hangul_gen_exe = b.addExecutable(.{
56 .name = "hangul",
57 .root_source_file = .{ .path = "codegen/hangul.zig" },
58 .target = b.host,
59 .optimize = .Debug,
60 });
61 const run_hangul_gen_exe = b.addRunArtifact(hangul_gen_exe);
62 const hangul_gen_out = run_hangul_gen_exe.addOutputFileArg("hangul.bin.z");
63
55 const ccc_gen_exe = b.addExecutable(.{ 64 const ccc_gen_exe = b.addExecutable(.{
56 .name = "ccc", 65 .name = "ccc",
57 .root_source_file = .{ .path = "codegen/ccc.zig" }, 66 .root_source_file = .{ .path = "codegen/ccc.zig" },
@@ -133,14 +142,22 @@ pub fn build(b: *std.Build) void {
133 }); 142 });
134 compat_data.addAnonymousImport("compat", .{ .root_source_file = compat_gen_out }); 143 compat_data.addAnonymousImport("compat", .{ .root_source_file = compat_gen_out });
135 144
145 const hangul_data = b.createModule(.{
146 .root_source_file = .{ .path = "src/HangulData.zig" },
147 .target = target,
148 .optimize = optimize,
149 });
150 hangul_data.addAnonymousImport("hangul", .{ .root_source_file = hangul_gen_out });
151
136 const norm_data = b.createModule(.{ 152 const norm_data = b.createModule(.{
137 .root_source_file = .{ .path = "src/NormData.zig" }, 153 .root_source_file = .{ .path = "src/NormData.zig" },
138 .target = target, 154 .target = target,
139 .optimize = optimize, 155 .optimize = optimize,
140 }); 156 });
141 norm_data.addImport("CanonData", canon_data); 157 norm_data.addImport("CanonData", canon_data);
142 norm_data.addImport("CompatData", compat_data);
143 norm_data.addImport("CombiningData", ccc_data); 158 norm_data.addImport("CombiningData", ccc_data);
159 norm_data.addImport("CompatData", compat_data);
160 norm_data.addImport("HangulData", hangul_data);
144 161
145 const norm = b.addModule("Normalizer", .{ 162 const norm = b.addModule("Normalizer", .{
146 .root_source_file = .{ .path = "src/Normalizer.zig" }, 163 .root_source_file = .{ .path = "src/Normalizer.zig" },