Use addModule instead of createModule again (#265) (partial revert of #264)

This commit is contained in:
Nikolas 2025-08-03 13:23:46 +02:00
parent ac0b07c4bd
commit 22bb251252
No known key found for this signature in database
GPG Key ID: E95F679E3CDD9784

View File

@ -51,7 +51,7 @@ fn getModule(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.buil
if (b.modules.contains("raylib")) {
return b.modules.get("raylib").?;
}
return b.createModule(.{
return b.addModule("raylib", .{
.root_source_file = b.path("lib/raylib.zig"),
.target = target,
.optimize = optimize,
@ -61,7 +61,7 @@ fn getModule(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.buil
const gui = struct {
fn getModule(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.builtin.OptimizeMode) *std.Build.Module {
const raylib = this.getModule(b, target, optimize);
return b.createModule(.{
return b.addModule("raygui", .{
.root_source_file = b.path("lib/raygui.zig"),
.imports = &.{.{ .name = "raylib-zig", .module = raylib }},
.target = target,