-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.zig
More file actions
29 lines (28 loc) · 896 Bytes
/
build.zig
File metadata and controls
29 lines (28 loc) · 896 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
const std = @import("std");
const Build = std.Build;
const OptimizeMode = std.builtin.OptimizeMode;
pub fn build(b: *Build) !void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const dep_sokol = b.dependency("sokol", .{
.target = target,
.optimize = optimize,
});
const hello = b.addExecutable(.{
.name = "triangle",
.root_module = b.createModule(.{
.root_source_file = b.path("src/triangle.zig"),
.target = target,
.optimize = optimize,
.imports = &.{
.{
.name = "sokol",
.module = dep_sokol.module("sokol"),
},
},
}),
});
b.installArtifact(hello);
const run = b.addRunArtifact(hello);
b.step("run", "Run triangle").dependOn(&run.step);
}