Compare commits
2 commits
0ba2c5ffcc
...
8d312cd987
Author | SHA1 | Date | |
---|---|---|---|
8d312cd987 | |||
c80a6d0df7 |
3 changed files with 12 additions and 4 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
zig-cache/
|
zig-cache/
|
||||||
*.mp3
|
*.mp3
|
||||||
*.wav
|
*.wav
|
||||||
|
build_runner.zig
|
||||||
|
|
13
build.zig
13
build.zig
|
@ -13,23 +13,30 @@ fn setupLinks(step: *builds.LibExeObjStep) void {
|
||||||
step.linkSystemLibrary("GraphicsMagick");
|
step.linkSystemLibrary("GraphicsMagick");
|
||||||
|
|
||||||
step.addIncludeDir("/usr/include/GraphicsMagick");
|
step.addIncludeDir("/usr/include/GraphicsMagick");
|
||||||
|
step.addIncludeDir("/usr/include");
|
||||||
|
|
||||||
const possible_lilv_include_dirs = [_][]const u8{
|
const possible_lilv_include_dirs = [_][]const u8{
|
||||||
"/usr/include/lilv-0",
|
|
||||||
"/usr/include/lilv-0/lilv",
|
"/usr/include/lilv-0/lilv",
|
||||||
|
"/usr/include/lilv-0",
|
||||||
};
|
};
|
||||||
|
|
||||||
var found_any_lilv = false;
|
var found_any_lilv = false;
|
||||||
|
|
||||||
for (possible_lilv_include_dirs) |possible_lilv_dir| {
|
for (possible_lilv_include_dirs) |possible_lilv_dir| {
|
||||||
var possible_dir = std.fs.cwd().openDir(possible_lilv_dir) catch |err| {
|
var possible_dir = std.fs.cwd().openDir(possible_lilv_dir, .{}) catch |err| {
|
||||||
|
std.debug.warn("possible lilv {} fail: {}\n", .{ possible_lilv_dir, err });
|
||||||
continue;
|
continue;
|
||||||
};
|
};
|
||||||
|
|
||||||
possible_dir.close();
|
possible_dir.close();
|
||||||
found_any_lilv = true;
|
found_any_lilv = true;
|
||||||
|
|
||||||
|
std.debug.warn("found lilv at '{}'\n", .{possible_lilv_dir});
|
||||||
|
step.addIncludeDir(possible_lilv_dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!found_any_lilv) {
|
if (!found_any_lilv) {
|
||||||
std.debug.warn("No LILV library was found :(\n");
|
std.debug.warn("No LILV library was found :(\n", .{});
|
||||||
@panic("no lilv found");
|
@panic("no lilv found");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ const plugin = @import("plugin.zig");
|
||||||
pub const c = @cImport({
|
pub const c = @cImport({
|
||||||
@cInclude("sndfile.h");
|
@cInclude("sndfile.h");
|
||||||
@cInclude("lilv/lilv.h");
|
@cInclude("lilv/lilv.h");
|
||||||
@cInclude("lv2/core/lv2.h");
|
@cInclude("lv2.h");
|
||||||
});
|
});
|
||||||
|
|
||||||
pub fn Lv2Core(comptime ns: []const u8) []const u8 {
|
pub fn Lv2Core(comptime ns: []const u8) []const u8 {
|
||||||
|
|
Loading…
Reference in a new issue