discard build.zig, only use src/build.zig, to avoid annoying zig-out path problem
This commit is contained in:
parent
07a2a47ba5
commit
18be6d3fba
|
|
@ -1,7 +0,0 @@
|
|||
const std = @import("std");
|
||||
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 {
|
||||
raylib.build(b);
|
||||
}
|
||||
|
|
@ -27,10 +27,10 @@ fn add_module(comptime module: []const u8, b: *std.Build, target: std.zig.CrossT
|
|||
exe.addCSourceFile(.{ .file = .{ .path = path }, .flags = &.{} });
|
||||
exe.linkLibC();
|
||||
exe.addObjectFile(switch (target.getOsTag()) {
|
||||
.windows => .{ .path = "../zig-out/lib/raylib.lib" },
|
||||
.linux => .{ .path = "../zig-out/lib/libraylib.a" },
|
||||
.macos => .{ .path = "../zig-out/lib/libraylib.a" },
|
||||
.emscripten => .{ .path = "../zig-out/lib/libraylib.a" },
|
||||
.windows => .{ .path = "../src/zig-out/lib/raylib.lib" },
|
||||
.linux => .{ .path = "../src/zig-out/lib/libraylib.a" },
|
||||
.macos => .{ .path = "../src/zig-out/lib/libraylib.a" },
|
||||
.emscripten => .{ .path = "../src/zig-out/lib/libraylib.a" },
|
||||
else => @panic("Unsupported OS"),
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -192,12 +192,12 @@ pub fn build(b: *std.Build) void {
|
|||
|
||||
const lib = addRaylib(b, target, optimize, options);
|
||||
|
||||
lib.installHeader("src/raylib.h", "raylib.h");
|
||||
lib.installHeader("src/raymath.h", "raymath.h");
|
||||
lib.installHeader("src/rlgl.h", "rlgl.h");
|
||||
lib.installHeader("raylib.h", "raylib.h");
|
||||
lib.installHeader("raymath.h", "raymath.h");
|
||||
lib.installHeader("rlgl.h", "rlgl.h");
|
||||
|
||||
if (options.raygui) {
|
||||
lib.installHeader("../raygui/src/raygui.h", "raygui.h");
|
||||
lib.installHeader("../../raygui/src/raygui.h", "raygui.h");
|
||||
}
|
||||
|
||||
b.installArtifact(lib);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user