build: update for zig-0.12.0-dev.2208+4debd4338
I may move this commit to a separate branch, since there are a variety of improvements that I think I want to get applied to the 0.11.x-compatible codebase still. However, I have also not been motivated to work on those fixes, since this codebase is kind of crusty due to being the first thing I ever wrote in zig. Doing a bigger rewrite might supply the motivation to make those improvements. I will have to think about it. For now, I am going to focus elsewhere.
This commit is contained in:
parent
b77a1f59c2
commit
074db7f4f6
@ -1,11 +1,11 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
|
|
||||||
pub fn build(b: *std.Build) void {
|
pub fn build(b: *std.Build) void {
|
||||||
const target: std.zig.CrossTarget = b.standardTargetOptions(.{});
|
const target: std.Build.ResolvedTarget = b.standardTargetOptions(.{});
|
||||||
const optimize: std.builtin.Mode = b.standardOptimizeOption(.{});
|
const optimize: std.builtin.Mode = b.standardOptimizeOption(.{});
|
||||||
|
|
||||||
const noclip = b.addModule("noclip", .{
|
const noclip = b.addModule("noclip", .{
|
||||||
.source_file = .{ .path = "source/noclip.zig" },
|
.root_source_file = .{ .path = "source/noclip.zig" },
|
||||||
});
|
});
|
||||||
|
|
||||||
demo(b, noclip, target, optimize);
|
demo(b, noclip, target, optimize);
|
||||||
@ -24,7 +24,7 @@ pub fn build(b: *std.Build) void {
|
|||||||
fn demo(
|
fn demo(
|
||||||
b: *std.Build,
|
b: *std.Build,
|
||||||
noclip: *std.Build.Module,
|
noclip: *std.Build.Module,
|
||||||
target: std.zig.CrossTarget,
|
target: std.Build.ResolvedTarget,
|
||||||
optimize: std.builtin.Mode,
|
optimize: std.builtin.Mode,
|
||||||
) void {
|
) void {
|
||||||
const demo_step = b.step("demo", "Build and install CLI demo program");
|
const demo_step = b.step("demo", "Build and install CLI demo program");
|
||||||
@ -35,7 +35,7 @@ fn demo(
|
|||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
exe.addModule("noclip", noclip);
|
exe.root_module.addImport("noclip", noclip);
|
||||||
const install_demo = b.addInstallArtifact(exe, .{});
|
const install_demo = b.addInstallArtifact(exe, .{});
|
||||||
|
|
||||||
demo_step.dependOn(&install_demo.step);
|
demo_step.dependOn(&install_demo.step);
|
||||||
|
11
build.zig.zon
Normal file
11
build.zig.zon
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
.{
|
||||||
|
.name = "NOCLIP",
|
||||||
|
.version = "0.1.0-pre",
|
||||||
|
.dependencies = .{},
|
||||||
|
.paths = .{
|
||||||
|
"source",
|
||||||
|
"build.zig",
|
||||||
|
"build.zig.zon",
|
||||||
|
"license",
|
||||||
|
},
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user