build raylib and raygui manually
This commit is contained in:
parent
ba3836fbfb
commit
3e52a42d88
15 changed files with 93 additions and 6384 deletions
31
build.zig
31
build.zig
|
@ -14,22 +14,23 @@ pub fn build(b: *std.Build) void {
|
|||
.optimize = optimize,
|
||||
});
|
||||
|
||||
// We cannot directly use modules since v4.5 is not compatible with zig
|
||||
// v0.11
|
||||
const raylib_dep = b.dependency("raylib", .{
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
});
|
||||
exe.linkLibrary(raylib_dep.artifact("raylib"));
|
||||
//
|
||||
// C dependencies
|
||||
//
|
||||
exe.linkLibC();
|
||||
|
||||
const cflags = [_][]const u8{};
|
||||
exe.addCSourceFile(.{
|
||||
.file = .{
|
||||
.path = "3rd-party/raygui.c",
|
||||
},
|
||||
.flags = &cflags,
|
||||
});
|
||||
exe.addIncludePath(.{ .path = "3rd-party/" });
|
||||
// Raylib
|
||||
exe.addIncludePath(.{ .path = "build/raylib/include" });
|
||||
exe.addLibraryPath(.{ .path = "build/raylib" });
|
||||
exe.linkSystemLibrary("raylib");
|
||||
|
||||
// Raygui
|
||||
exe.addIncludePath(.{ .path = "3rd-party/raygui/src" });
|
||||
exe.addIncludePath(.{ .path = "3rd-party/raygui" });
|
||||
exe.addLibraryPath(.{ .path = "build/raygui" });
|
||||
exe.linkSystemLibrary("raygui");
|
||||
|
||||
// SQLite
|
||||
exe.linkSystemLibrary("sqlite3");
|
||||
|
||||
// This declares intent for the executable to be installed into the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue