chore: add zigrc

This commit is contained in:
2025-05-23 18:15:37 +02:00
parent c4d4de67b0
commit 4a9dc12b48
2 changed files with 19 additions and 1 deletions

View File

@@ -34,13 +34,14 @@ pub fn build(b: *std.Build) void {
.root_module = gui_exe_mod,
});
//Dependencies
const vaxis = b.dependency("vaxis", .{
.target = target,
.optimize = optimize,
});
console_exe.root_module.addImport("vaxis", vaxis.module("vaxis"));
b.installArtifact(console_exe);
const dvui = b.dependency("dvui", .{
.target = target,
@@ -49,7 +50,20 @@ pub fn build(b: *std.Build) void {
});
gui_exe.root_module.addImport("dvui", dvui.module("dvui_raylib"));
// Import the dependency
const zigrc_dep = b.dependency("zigrc", .{});
// Extract the module
const zigrc_mod = zigrc_dep.artifact("zig-rc").root_module;
console_exe.root_module.addImport("zigrc", zigrc_mod);
gui_exe.root_module.addImport("zigrc", zigrc_mod);
b.installArtifact(console_exe);
b.installArtifact(gui_exe);
// Run commands
const run_sandbox_cmd = b.addRunArtifact(sandbox_exe);
run_sandbox_cmd.step.dependOn(b.getInstallStep());