~mil/fbp

ref: 6db125ae1480eb0d59d795d298b2f1835dcd5ffe fbp/build.zig -rw-r--r-- 880 bytes
6db125aeMiles Alan Disambiguate between finger down/drag/up for touch processing 5 months ago
                                                                                
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
const Builder = @import("std").build.Builder;
const std = @import("std");

fn setDependencies(step: *std.build.LibExeObjStep) void {
    step.linkSystemLibrary("c");
    step.linkSystemLibrary("freetype2");
}

pub fn build(b: *std.build.Builder) void {
    const exe = b.addExecutable("fbp", "src/main.zig");

    const target = b.standardTargetOptions(.{});
    const mode = b.standardReleaseOptions();
    exe.setTarget(target);
    exe.setBuildMode(mode);

    setDependencies(exe);

    exe.install();

    const run_cmd = exe.run();
    run_cmd.step.dependOn(b.getInstallStep());

    const run_step = b.step("run", "Run fbp");
    run_step.dependOn(&run_cmd.step);

    // Setup test
    const test_all_step = b.step("test", "Run all tests.");
    const run_tests = b.addTest("./src/test.zig");
    setDependencies(run_tests);
    test_all_step.dependOn(&run_tests.step);
}