-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.zig
More file actions
21 lines (17 loc) · 854 Bytes
/
build.zig
File metadata and controls
21 lines (17 loc) · 854 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const std = @import("std");
const Builder = @import("std").build.Builder;
const examples = &[_][]const u8{"amp", "fifths", "params"};
pub fn build(b: *Builder) !void {
const mode = b.standardReleaseOptions();
inline for (examples) |example, i| {
const lib = b.addSharedLibrary(example, "examples/" ++ example ++ "/" ++ example ++ ".zig", .{ .unversioned = {} });
lib.addPackagePath("lv2", "src/lv2.zig");
lib.setBuildMode(mode);
lib.setOutputDir("zig-out/" ++ example ++ ".lv2");
lib.linkLibC();
lib.addIncludeDir("lv2");
var step = b.step(example, "Build example \"" ++ example ++ "\"");
step.dependOn(&b.addInstallFileWithDir("examples/" ++ example ++ "/" ++ example ++ ".ttl", .Prefix, example ++ ".lv2/manifest.ttl").step);
step.dependOn(&lib.step);
}
}