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