From 128fd07b19cad595a9150fe41fc76c9290427472 Mon Sep 17 00:00:00 2001 From: Chen Kai <281165273grape@gmail.com> Date: Fri, 29 Nov 2024 15:30:23 +0800 Subject: [PATCH] fix module --- build.zig | 13 +++++++++---- build.zig.zon.zig | 0 2 files changed, 9 insertions(+), 4 deletions(-) delete mode 100644 build.zig.zon.zig diff --git a/build.zig b/build.zig index c049849..dcb38b4 100644 --- a/build.zig +++ b/build.zig @@ -18,17 +18,22 @@ pub fn build(b: *std.Build) !void { const optimize = b.standardOptimizeOption(.{}); // Create module - _ = b.addModule("libuv", .{ - .root_source_file = .{ .cwd_relative = "src/main.zig" }, + const module = b.addModule("libuv", .{ + .link_libc = true, + .root_source_file = b.path("src/main.zig"), + .target = target, + .optimize = optimize, }); + module.addIncludePath(.{ .cwd_relative = include_path }); const tests = b.addTest(.{ .name = "pixman-test", - .root_source_file = .{ .cwd_relative = "src/main.zig" }, + .root_source_file = b.path("src/main.zig"), .target = target, .optimize = optimize, }); - _ = try link(b, tests); + const lib = try link(b, tests); + b.installArtifact(lib); b.installArtifact(tests); const test_step = b.step("test", "Run tests"); diff --git a/build.zig.zon.zig b/build.zig.zon.zig deleted file mode 100644 index e69de29..0000000