use zig packaging for raylib

This commit is contained in:
Fabien Freling 2023-10-04 16:03:06 +02:00
parent d2f8af619f
commit da5ae3710d
4 changed files with 12 additions and 6 deletions

3
.gitmodules vendored
View file

@ -1,6 +1,3 @@
[submodule "zig/3rd-party/raylib"]
path = zig/3rd-party/raylib
url = https://github.com/raysan5/raylib/
[submodule "zig/3rd-party/raygui"]
path = zig/3rd-party/raygui
url = https://github.com/raysan5/raygui/

@ -1 +0,0 @@
Subproject commit bc15c19518968878b68bbfe8eac3fe4297f11770

View file

@ -16,12 +16,12 @@ pub fn build(b: *std.Build) void {
// We cannot directly use modules since v4.5 is not compatible with zig
// v0.11
const raylib_dep = b.anonymousDependency("3rd-party/raylib/", @import("3rd-party/raylib/build.zig"), .{
const raylib_dep = b.dependency("raylib", .{
.target = target,
.optimize = optimize,
});
exe.addIncludePath(.{ .path = "3rd-party/raygui/src" });
exe.linkLibrary(raylib_dep.artifact("raylib"));
exe.addIncludePath(.{ .path = "3rd-party/raygui/src" });
exe.linkSystemLibrary("sqlite3");
// This declares intent for the executable to be installed into the

10
zig/build.zig.zon Normal file
View file

@ -0,0 +1,10 @@
.{
.name = "fabapp",
.version = "0.1.0",
.dependencies = .{
.raylib = .{
.url = "https://github.com/raysan5/raylib/archive/bc15c19518968878b68bbfe8eac3fe4297f11770.tar.gz",
.hash = "122093954b8c911e507de32d83a2046e122c6aca64e71f5244d54f9bbb93730c3ab7",
},
},
}