Bump to Zig 0.11/raylib 4.6-dev
This commit is contained in:
parent
9c5197bad4
commit
edbd73e6be
19 changed files with 478 additions and 402 deletions
11
lib.zig
11
lib.zig
|
|
@ -3,20 +3,14 @@ const Builder = std.build.Builder;
|
|||
const LibExeObjStep = std.build.LibExeObjStep;
|
||||
const rl = @import("raylib/src/build.zig");
|
||||
|
||||
var ran_git = false;
|
||||
const srcdir = getSrcDir();
|
||||
|
||||
fn getSrcDir() []const u8 {
|
||||
return std.fs.path.dirname(@src().file) orelse ".";
|
||||
}
|
||||
|
||||
pub fn link(exe: *LibExeObjStep, system_lib: bool) void {
|
||||
if (system_lib) {
|
||||
exe.linkSystemLibrary("raylib");
|
||||
return;
|
||||
} else {
|
||||
exe.linkLibrary(rl.addRaylib(exe.builder, exe.target));
|
||||
}
|
||||
pub fn link(exe: *std.Build.CompileStep) void {
|
||||
exe.linkLibrary(rl.addRaylib(exe.builder, exe.target));
|
||||
|
||||
const target_os = exe.target.toTarget().os.tag;
|
||||
switch (target_os) {
|
||||
|
|
@ -57,6 +51,7 @@ pub fn link(exe: *LibExeObjStep, system_lib: bool) void {
|
|||
pub fn addAsPackage(name: []const u8, to: *LibExeObjStep) void {
|
||||
to.addPackagePath(name, srcdir ++ "/lib/raylib-zig.zig");
|
||||
}
|
||||
|
||||
pub const math = struct {
|
||||
pub fn addAsPackage(name: []const u8, to: *LibExeObjStep) void {
|
||||
to.addPackagePath(name, srcdir ++ "/lib/raylib-zig-math.zig");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue