mirror of
https://github.com/raysan5/raylib.git
synced 2025-10-04 17:06:27 +00:00
Fix build.zig and use zig fmt (#4242)
+ `std.mem.split` is deprecated, `splitScalar` seems like the intended choice here + zig files should be formatted according to `zig fmt`
This commit is contained in:
@@ -59,7 +59,7 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
|
||||
const content = try std.fs.cwd().readFileAlloc(b.allocator, file, std.math.maxInt(usize));
|
||||
defer b.allocator.free(content);
|
||||
|
||||
var lines = std.mem.split(u8, content, "\n");
|
||||
var lines = std.mem.splitScalar(u8, content, '\n');
|
||||
while (lines.next()) |line| {
|
||||
if (!std.mem.containsAtLeast(u8, line, 1, "SUPPORT")) continue;
|
||||
if (std.mem.startsWith(u8, line, "//")) continue;
|
||||
@@ -149,7 +149,6 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
|
||||
raylib.addLibraryPath(.{ .cwd_relative = "/usr/lib" });
|
||||
raylib.addIncludePath(.{ .cwd_relative = "/usr/include" });
|
||||
if (options.linux_display_backend == .X11 or options.linux_display_backend == .Both) {
|
||||
|
||||
raylib.defineCMacro("_GLFW_X11", null);
|
||||
raylib.linkSystemLibrary("X11");
|
||||
}
|
||||
|
Reference in New Issue
Block a user