diff --git a/.gitignore b/.gitignore index 44f7213..b43912f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ zig-cache/ *.mp3 *.wav -build_runner.zig diff --git a/build.zig b/build.zig index 6858c80..622961e 100644 --- a/build.zig +++ b/build.zig @@ -1,6 +1,5 @@ -const std = @import("std"); -const builds = std.build; -const Builder = std.build.Builder; +const builds = @import("std").build; +const Builder = @import("std").build.Builder; fn setupLinks(step: *builds.LibExeObjStep) void { step.linkSystemLibrary("c"); @@ -12,33 +11,8 @@ fn setupLinks(step: *builds.LibExeObjStep) void { step.linkSystemLibrary("GraphicsMagickWand"); step.linkSystemLibrary("GraphicsMagick"); + step.addIncludeDir("/usr/include/lilv-0"); step.addIncludeDir("/usr/include/GraphicsMagick"); - step.addIncludeDir("/usr/include"); - - const possible_lilv_include_dirs = [_][]const u8{ - "/usr/include/lilv-0/lilv", - "/usr/include/lilv-0", - }; - - var found_any_lilv = false; - - for (possible_lilv_include_dirs) |possible_lilv_dir| { - var possible_dir = std.fs.cwd().openDir(possible_lilv_dir, .{}) catch |err| { - std.debug.warn("possible lilv {} fail: {}\n", .{ possible_lilv_dir, err }); - continue; - }; - - possible_dir.close(); - found_any_lilv = true; - - std.debug.warn("found lilv at '{}'\n", .{possible_lilv_dir}); - step.addIncludeDir(possible_lilv_dir); - } - - if (!found_any_lilv) { - std.debug.warn("No LILV library was found :(\n", .{}); - @panic("no lilv found"); - } } pub fn build(b: *Builder) void { diff --git a/src/lv2_helpers.zig b/src/lv2_helpers.zig index a72e07d..abc9c8f 100644 --- a/src/lv2_helpers.zig +++ b/src/lv2_helpers.zig @@ -4,7 +4,7 @@ const plugin = @import("plugin.zig"); pub const c = @cImport({ @cInclude("sndfile.h"); @cInclude("lilv/lilv.h"); - @cInclude("lv2.h"); + @cInclude("lv2/core/lv2.h"); }); pub fn Lv2Core(comptime ns: []const u8) []const u8 {