From 630577f550d7e7486b177036efa0821f98f6342c Mon Sep 17 00:00:00 2001 From: RedStealthDev Date: Mon, 26 Feb 2024 13:31:35 +0100 Subject: [PATCH] fix build system --- zig-ecs/build.zig | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/zig-ecs/build.zig b/zig-ecs/build.zig index fc09c06..30b1da0 100644 --- a/zig-ecs/build.zig +++ b/zig-ecs/build.zig @@ -75,11 +75,10 @@ pub const LibType = enum(i32) { exe_compiled, }; -pub fn getModule(comptime prefix_path: []const u8) std.build.Module { - return .{ - .name = "ecs", - .path = .{ .path = prefix_path ++ "src/ecs.zig" }, - }; +pub fn getModule(b: *std.Build, comptime prefix_path: []const u8) *std.build.Module { + return b.addModule("zig-ecs", .{ + .source_file = .{ .path = prefix_path ++ "/src/ecs.zig" }, + }); } /// prefix_path is used to add package paths. It should be the the same path used to include this build file