Remove physac, explicit raymath, always copy rlgl.h and raymath.h
This commit is contained in:
parent
b332d87a6a
commit
cfef692bbe
|
|
@ -37,17 +37,6 @@ pub fn addRaylib(b: *std.Build, target: std.zig.CrossTarget, optimize: std.built
|
||||||
raylib.addIncludePath(srcdir ++ "/../../raygui/src");
|
raylib.addIncludePath(srcdir ++ "/../../raygui/src");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.raymath) {
|
|
||||||
_ = gen_step.add(srcdir ++ "/raymath.c", "#define RAYMATH_IMPLEMENTATION\n#include \"raymath.h\"\n");
|
|
||||||
raylib.addCSourceFile(srcdir ++ "/raymath.c", raylib_flags);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (options.physac) {
|
|
||||||
_ = gen_step.add(srcdir ++ "/physac.c", "#define PHYSAC_IMPLEMENTATION\n#include \"physac.h\"\n");
|
|
||||||
raylib.addCSourceFile(srcdir ++ "/physac.c", raylib_flags);
|
|
||||||
raylib.addIncludePath(srcdir ++ "/../../physac/src");
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (target.getOsTag()) {
|
switch (target.getOsTag()) {
|
||||||
.windows => {
|
.windows => {
|
||||||
raylib.addCSourceFiles(&.{srcdir ++ "/rglfw.c"}, raylib_flags);
|
raylib.addCSourceFiles(&.{srcdir ++ "/rglfw.c"}, raylib_flags);
|
||||||
|
|
@ -127,8 +116,6 @@ pub fn addRaylib(b: *std.Build, target: std.zig.CrossTarget, optimize: std.built
|
||||||
|
|
||||||
const Options = struct {
|
const Options = struct {
|
||||||
raygui: bool = false,
|
raygui: bool = false,
|
||||||
raymath: bool = false,
|
|
||||||
physac: bool = false,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
pub fn build(b: *std.Build) void {
|
pub fn build(b: *std.Build) void {
|
||||||
|
|
@ -153,19 +140,13 @@ pub fn build(b: *std.Build) void {
|
||||||
});
|
});
|
||||||
|
|
||||||
lib.installHeader("src/raylib.h", "raylib.h");
|
lib.installHeader("src/raylib.h", "raylib.h");
|
||||||
|
lib.installHeader("src/raymath.h", "raymath.h");
|
||||||
if (raymath orelse false) {
|
lib.installHeader("src/rlgl.h", "rlgl.h");
|
||||||
lib.installHeader("src/raymath.h", "raymath.h");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (raygui orelse false) {
|
if (raygui orelse false) {
|
||||||
lib.installHeader("../raygui/src/raygui.h", "raygui.h");
|
lib.installHeader("../raygui/src/raygui.h", "raygui.h");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (physac orelse false) {
|
|
||||||
lib.installHeader("../physac/src/physac.h", "physac.h");
|
|
||||||
}
|
|
||||||
|
|
||||||
b.installArtifact(lib);
|
b.installArtifact(lib);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user