-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.zig
33 lines (29 loc) · 878 Bytes
/
build.zig
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
30
31
32
33
const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const cfgen = b.addExecutable(.{
.name = "cfgen",
.target = target,
.optimize = optimize,
});
cfgen.addCSourceFiles(.{
.files = &[_][]const u8{
"src/main.cpp",
"src/ast.cpp",
"src/class.cpp",
"src/cli.cpp",
"src/render.cpp",
},
});
cfgen.linkLibCpp();
cfgen.addIncludePath(.{ .path = "include/" });
cfgen.linkSystemLibrary("clang");
b.installArtifact(cfgen);
const run = b.addRunArtifact(cfgen);
run.step.dependOn(b.getInstallStep());
if (b.args) |args|
run.addArgs(args);
const run_step = b.step("run", "Run cfgen");
run_step.dependOn(&run.step);
}