From 32c68059a05dde8a57a330db6d14a32506081516 Mon Sep 17 00:00:00 2001 From: Jose Colon Rodriguez Date: Tue, 27 Feb 2024 09:26:40 -0400 Subject: Using HangulData in NormData --- build.zig | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'build.zig') 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 { const run_compat_gen_exe = b.addRunArtifact(compat_gen_exe); const compat_gen_out = run_compat_gen_exe.addOutputFileArg("compat.bin.z"); + const hangul_gen_exe = b.addExecutable(.{ + .name = "hangul", + .root_source_file = .{ .path = "codegen/hangul.zig" }, + .target = b.host, + .optimize = .Debug, + }); + const run_hangul_gen_exe = b.addRunArtifact(hangul_gen_exe); + const hangul_gen_out = run_hangul_gen_exe.addOutputFileArg("hangul.bin.z"); + const ccc_gen_exe = b.addExecutable(.{ .name = "ccc", .root_source_file = .{ .path = "codegen/ccc.zig" }, @@ -133,14 +142,22 @@ pub fn build(b: *std.Build) void { }); compat_data.addAnonymousImport("compat", .{ .root_source_file = compat_gen_out }); + const hangul_data = b.createModule(.{ + .root_source_file = .{ .path = "src/HangulData.zig" }, + .target = target, + .optimize = optimize, + }); + hangul_data.addAnonymousImport("hangul", .{ .root_source_file = hangul_gen_out }); + const norm_data = b.createModule(.{ .root_source_file = .{ .path = "src/NormData.zig" }, .target = target, .optimize = optimize, }); norm_data.addImport("CanonData", canon_data); - norm_data.addImport("CompatData", compat_data); norm_data.addImport("CombiningData", ccc_data); + norm_data.addImport("CompatData", compat_data); + norm_data.addImport("HangulData", hangul_data); const norm = b.addModule("Normalizer", .{ .root_source_file = .{ .path = "src/Normalizer.zig" }, -- cgit v1.2.3