Added a note to build.zig files that denotes what version of zig they have been tested with.

This commit is contained in:
Talha Qamar 2023-05-14 05:36:53 +05:00
parent ee5a1c4e34
commit 8159b18ba8
3 changed files with 4 additions and 0 deletions

View File

@ -1,6 +1,7 @@
const std = @import("std"); const std = @import("std");
const raylib = @import("src/build.zig"); const raylib = @import("src/build.zig");
// This has been tested to work with zig master branch as of commit 87de821 or May 14 2023
pub fn build(b: *std.Build) void { pub fn build(b: *std.Build) void {
raylib.build(b); raylib.build(b);
} }

View File

@ -1,6 +1,7 @@
const std = @import("std"); const std = @import("std");
const builtin = @import("builtin"); const builtin = @import("builtin");
// This has been tested to work with zig master branch as of commit 87de821 or May 14 2023
fn add_module(comptime module: []const u8, b: *std.Build, target: std.zig.CrossTarget, optimize: std.builtin.OptimizeMode) !*std.Build.Step { fn add_module(comptime module: []const u8, b: *std.Build, target: std.zig.CrossTarget, optimize: std.builtin.OptimizeMode) !*std.Build.Step {
if (target.getOsTag() == .emscripten) { if (target.getOsTag() == .emscripten) {
@panic("Emscripten building via Zig unsupported"); @panic("Emscripten building via Zig unsupported");

View File

@ -1,5 +1,7 @@
const std = @import("std"); const std = @import("std");
// This build script has been tested to work with zig master branch as of commit 87de821 or 14 May 2023
pub fn addRaylib(b: *std.Build, target: std.zig.CrossTarget, optimize: std.builtin.OptimizeMode) *std.Build.CompileStep { pub fn addRaylib(b: *std.Build, target: std.zig.CrossTarget, optimize: std.builtin.OptimizeMode) *std.Build.CompileStep {
const raylib_flags = &[_][]const u8{ const raylib_flags = &[_][]const u8{
"-std=gnu99", "-std=gnu99",