From c80a6d0df70c8ef27637cf38be1f5645ab23eaee Mon Sep 17 00:00:00 2001 From: Luna Date: Tue, 2 Jun 2020 21:54:39 -0300 Subject: [PATCH] fix typos and actually add dirs to step --- build.zig | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/build.zig b/build.zig index da24ddb..8b3484b 100644 --- a/build.zig +++ b/build.zig @@ -13,23 +13,29 @@ fn setupLinks(step: *builds.LibExeObjStep) void { step.linkSystemLibrary("GraphicsMagick"); step.addIncludeDir("/usr/include/GraphicsMagick"); + step.addIncludeDir("/usr/include"); const possible_lilv_include_dirs = [_][]const u8{ - "/usr/include/lilv-0", "/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| { + 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"); + std.debug.warn("No LILV library was found :(\n", .{}); @panic("no lilv found"); } }