mirror of https://github.com/raysan5/raylib
Fix FileNotFound: .../src/raylib.h (#3915)
This commit is contained in:
parent
ba2a103011
commit
583f81f458
|
@ -258,12 +258,12 @@ pub fn build(b: *std.Build) !void {
|
||||||
|
|
||||||
const lib = try addRaylib(b, target, optimize, options);
|
const lib = try addRaylib(b, target, optimize, options);
|
||||||
|
|
||||||
installHeaderVersioned(lib, "src/raylib.h", "raylib.h");
|
installHeaderVersioned(b, lib, "src/raylib.h", "raylib.h");
|
||||||
installHeaderVersioned(lib, "src/raymath.h", "raymath.h");
|
installHeaderVersioned(b, lib, "src/raymath.h", "raymath.h");
|
||||||
installHeaderVersioned(lib, "src/rlgl.h", "rlgl.h");
|
installHeaderVersioned(b, lib, "src/rlgl.h", "rlgl.h");
|
||||||
|
|
||||||
if (options.raygui) {
|
if (options.raygui) {
|
||||||
installHeaderVersioned(lib, "../raygui/src/raygui.h", "raygui.h");
|
installHeaderVersioned(b, lib, "../raygui/src/raygui.h", "raygui.h");
|
||||||
}
|
}
|
||||||
|
|
||||||
b.installArtifact(lib);
|
b.installArtifact(lib);
|
||||||
|
@ -309,12 +309,16 @@ inline fn addCSourceFilesVersioned(
|
||||||
}
|
}
|
||||||
|
|
||||||
fn installHeaderVersioned(
|
fn installHeaderVersioned(
|
||||||
|
b: *std.Build,
|
||||||
lib: *std.Build.Step.Compile,
|
lib: *std.Build.Step.Compile,
|
||||||
source: []const u8,
|
source: []const u8,
|
||||||
dest: []const u8,
|
dest: []const u8,
|
||||||
) void {
|
) void {
|
||||||
if (comptime builtin.zig_version.minor >= 12) {
|
if (comptime builtin.zig_version.minor >= 12) {
|
||||||
lib.installHeader(.{ .path = source }, dest);
|
lib.installHeader(.{ .src_path = .{
|
||||||
|
.owner = b,
|
||||||
|
.sub_path = source,
|
||||||
|
} }, dest);
|
||||||
} else {
|
} else {
|
||||||
lib.installHeader(source, dest);
|
lib.installHeader(source, dest);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue