chore: update zgui

This commit is contained in:
Rekai Nyangadzayi Musuka 2024-03-22 11:14:45 -05:00
parent 9c998f7d66
commit b0e23c1e28
4 changed files with 12 additions and 15 deletions

3
.gitmodules vendored
View File

@ -1,6 +1,3 @@
[submodule "lib/zgui"]
path = lib/zgui
url = https://git.musuka.dev/paoda/zgui
[submodule "lib/SDL.zig"]
path = lib/SDL.zig
url = https://github.com/paoda/SDL.zig

View File

@ -1,7 +1,5 @@
const std = @import("std");
const Sdk = @import("lib/SDL.zig/build.zig");
const zgui = @import("lib/zgui/build.zig");
// Although this function looks imperative, note that its job is to
// declaratively construct a build graph that will be executed by an external
@ -27,23 +25,22 @@ pub fn build(b: *std.Build) void {
.optimize = optimize,
});
const sdk = Sdk.init(b, null); // https://github.com/MasterQ32/SDL.zig
const zgui = b.dependency("zgui", .{ .shared = false, .with_implot = true, .backend = .sdl2_opengl3 });
const imgui = zgui.artifact("imgui");
exe.root_module.addImport("arm32", b.dependency("arm32", .{}).module("arm32"));
exe.root_module.addImport("gdbstub", b.dependency("zba-gdbstub", .{}).module("gdbstub"));
exe.root_module.addImport("zig-clap", b.dependency("zig-clap", .{}).module("clap"));
exe.root_module.addImport("zgui", zgui.module("root"));
exe.root_module.addImport("sdl2", sdk.getNativeModule());
exe.root_module.addAnonymousImport("bitfield", .{ .root_source_file = .{ .path = "lib/bitfield.zig" } }); // https://github.com/FlorenceOS/
exe.root_module.addAnonymousImport("gl", .{ .root_source_file = .{ .path = "lib/gl.zig" } }); // https://github.com/MasterQ32/zig-opengl
// https://github.com/MasterQ32/SDL.zig
const sdk = Sdk.init(b, null);
sdk.link(exe, .dynamic);
// https://git.musuka.dev/paoda/zgui
const zgui_pkg = zgui.package(b, target, optimize, .{ .options = .{ .backend = .sdl2_opengl3 } });
sdk.link(zgui_pkg.zgui_c_cpp, .dynamic);
exe.root_module.addImport("sdl2", sdk.getNativeModule());
zgui_pkg.link(exe);
sdk.link(imgui, .dynamic);
exe.linkLibrary(imgui);
// This declares intent for the executable to be installed into the
// standard location when the user invokes the "install" step (the default

View File

@ -21,5 +21,9 @@
.url = "https://git.musuka.dev/paoda/arm32/archive/0010029783a907b2c73dc7741d9d81471ff98592.tar.gz",
.hash = "1220a0c28bb7bbb6df57bbaf91741d3e032f8fbf9e273f41d19384f6bcd1d3adf7d3",
},
.zgui = .{
.url = "https://git.musuka.dev/paoda/zgui/archive/28e926748b8f302dd4e2902835e392c9b87ea3c6.tar.gz",
.hash = "1220dbf1d809d07d1910b9853f162458ed1ebc66be81b21ccfc40a2552bc1019f9c2",
},
},
}

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