mirror of
https://github.com/raysan5/raylib.git
synced 2026-04-15 03:29:09 -04:00
[zig] Adjusting build.zig to run on 0.16.0 (#5758)
* Adjusting build.zig to run on 0.16.0 * changing version to 6
This commit is contained in:
12
build.zig
12
build.zig
@ -1,19 +1,9 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const builtin = @import("builtin");
|
const builtin = @import("builtin");
|
||||||
|
|
||||||
/// Minimum supported version of Zig
|
|
||||||
const min_ver = "0.16.0-dev.3013+abd131e33";
|
|
||||||
|
|
||||||
const emccOutputDir = "zig-out" ++ std.fs.path.sep_str ++ "htmlout" ++ std.fs.path.sep_str;
|
const emccOutputDir = "zig-out" ++ std.fs.path.sep_str ++ "htmlout" ++ std.fs.path.sep_str;
|
||||||
const emccOutputFile = "index.html";
|
const emccOutputFile = "index.html";
|
||||||
|
|
||||||
comptime {
|
|
||||||
const order = std.SemanticVersion.order;
|
|
||||||
const parse = std.SemanticVersion.parse;
|
|
||||||
if (order(builtin.zig_version, parse(min_ver) catch unreachable) == .lt)
|
|
||||||
@compileError("Raylib requires zig version " ++ min_ver);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub const emsdk = struct {
|
pub const emsdk = struct {
|
||||||
const zemscripten = @import("zemscripten");
|
const zemscripten = @import("zemscripten");
|
||||||
|
|
||||||
@ -489,7 +479,7 @@ fn addExamples(
|
|||||||
const all = b.step(module, "All " ++ module ++ " examples");
|
const all = b.step(module, "All " ++ module ++ " examples");
|
||||||
const module_subpath = b.pathJoin(&.{ "examples", module });
|
const module_subpath = b.pathJoin(&.{ "examples", module });
|
||||||
|
|
||||||
var dir = try std.Io.Dir.cwd().openDir(b.graph.io, b.pathFromRoot(module_subpath), .{ .iterate = true });
|
var dir = try b.build_root.handle.openDir(b.graph.io, module_subpath, .{ .iterate = true });
|
||||||
defer dir.close(b.graph.io);
|
defer dir.close(b.graph.io);
|
||||||
|
|
||||||
var iter = dir.iterate();
|
var iter = dir.iterate();
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
.{
|
.{
|
||||||
.name = .raylib,
|
.name = .raylib,
|
||||||
.version = "5.6.0-dev",
|
.version = "6.0.0",
|
||||||
.minimum_zig_version = "0.15.1",
|
.minimum_zig_version = "0.16.0",
|
||||||
|
|
||||||
.fingerprint = 0x13035e5cb8bc1ac2, // Changing this has security and trust implications.
|
.fingerprint = 0x13035e5cb8bc1ac2, // Changing this has security and trust implications.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user