chore: add zigrc
This commit is contained in:
16
build.zig
16
build.zig
@@ -34,13 +34,14 @@ pub fn build(b: *std.Build) void {
|
|||||||
.root_module = gui_exe_mod,
|
.root_module = gui_exe_mod,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//Dependencies
|
||||||
|
|
||||||
const vaxis = b.dependency("vaxis", .{
|
const vaxis = b.dependency("vaxis", .{
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
|
|
||||||
console_exe.root_module.addImport("vaxis", vaxis.module("vaxis"));
|
console_exe.root_module.addImport("vaxis", vaxis.module("vaxis"));
|
||||||
b.installArtifact(console_exe);
|
|
||||||
|
|
||||||
const dvui = b.dependency("dvui", .{
|
const dvui = b.dependency("dvui", .{
|
||||||
.target = target,
|
.target = target,
|
||||||
@@ -49,7 +50,20 @@ pub fn build(b: *std.Build) void {
|
|||||||
});
|
});
|
||||||
|
|
||||||
gui_exe.root_module.addImport("dvui", dvui.module("dvui_raylib"));
|
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);
|
b.installArtifact(gui_exe);
|
||||||
|
// Run commands
|
||||||
|
|
||||||
const run_sandbox_cmd = b.addRunArtifact(sandbox_exe);
|
const run_sandbox_cmd = b.addRunArtifact(sandbox_exe);
|
||||||
run_sandbox_cmd.step.dependOn(b.getInstallStep());
|
run_sandbox_cmd.step.dependOn(b.getInstallStep());
|
||||||
|
|||||||
@@ -44,6 +44,10 @@
|
|||||||
.url = "git+https://github.com/david-vanderson/dvui.git#5703f8f02fb8e1bf2c866517f208745e4d7af869",
|
.url = "git+https://github.com/david-vanderson/dvui.git#5703f8f02fb8e1bf2c866517f208745e4d7af869",
|
||||||
.hash = "dvui-0.2.0-AQFJmXGezQAwyj44yNdQ3oZ2XkMybh9r6ltiMEOKIwT6",
|
.hash = "dvui-0.2.0-AQFJmXGezQAwyj44yNdQ3oZ2XkMybh9r6ltiMEOKIwT6",
|
||||||
},
|
},
|
||||||
|
.zigrc = .{
|
||||||
|
.url = "git+https://github.com/Aandreba/zigrc#4c447813362fa29716357e88c1394cfb11f92b45",
|
||||||
|
.hash = "zigrc-1.0.0-lENlW5HIAADbYDdbz3y2nJEodEelv8MIG2W2f63An9fl",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
.paths = .{
|
.paths = .{
|
||||||
"build.zig",
|
"build.zig",
|
||||||
|
|||||||
Reference in New Issue
Block a user