|
|
@ -26,10 +26,10 @@ fn add_module(comptime module: []const u8, b: *std.Build, target: std.zig.CrossT |
|
|
|
exe.addCSourceFile(path, &[_][]const u8{}); |
|
|
|
exe.linkLibC(); |
|
|
|
exe.addObjectFile(switch (target.getOsTag()) { |
|
|
|
.windows => "../src/raylib.lib", |
|
|
|
.linux => "../src/libraylib.a", |
|
|
|
.macos => "../src/libraylib.a", |
|
|
|
.emscripten => "../src/libraylib.a", |
|
|
|
.windows => "../src/zig-out/lib/raylib.lib", |
|
|
|
.linux => "../src/zig-out/lib/libraylib.a", |
|
|
|
.macos => "../src/zig-out/lib/libraylib.a", |
|
|
|
.emscripten => "../src/zig-out/lib/libraylib.a", |
|
|
|
else => @panic("Unsupported OS"), |
|
|
|
}); |
|
|
|
|
|
|
@ -70,10 +70,8 @@ fn add_module(comptime module: []const u8, b: *std.Build, target: std.zig.CrossT |
|
|
|
}, |
|
|
|
} |
|
|
|
|
|
|
|
exe.setOutputDir(module); |
|
|
|
|
|
|
|
var run = exe.run(); |
|
|
|
run.step.dependOn(&b.addInstallArtifact(exe).step); |
|
|
|
b.installArtifact(exe); |
|
|
|
var run = b.addRunArtifact(exe); |
|
|
|
run.cwd = module; |
|
|
|
b.step(name, name).dependOn(&run.step); |
|
|
|
all.dependOn(&exe.step); |
|
|
|