Skip to content

Commit

Permalink
Fix raygui.c leftover from zig build (#3417)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluesillybeard committed Oct 14, 2023
1 parent 2498170 commit bf639f0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ pub fn addRaylib(b: *std.Build, target: std.zig.CrossTarget, optimize: std.built
}, raylib_flags);
}

var gen_step = std.build.Step.WriteFile.create(b);
var gen_step = b.addWriteFiles();
raylib.step.dependOn(&gen_step.step);

if (options.raygui) {
_ = gen_step.add(srcdir ++ "/raygui.c", "#define RAYGUI_IMPLEMENTATION\n#include \"raygui.h\"\n");
raylib.addCSourceFile(.{ .file = .{ .path = srcdir ++ "/raygui.c" }, .flags = raylib_flags });
const raygui_c_path = gen_step.add("raygui.c", "#define RAYGUI_IMPLEMENTATION\n#include \"raygui.h\"\n");
raylib.addCSourceFile(.{ .file = raygui_c_path, .flags = raylib_flags });
raylib.addIncludePath(.{ .path = srcdir });
raylib.addIncludePath(.{ .path = srcdir ++ "/../../raygui/src" });
}
Expand Down

0 comments on commit bf639f0

Please sign in to comment.