add basics of searching for lilv
This commit is contained in:
parent
18924adac4
commit
0ba2c5ffcc
1 changed files with 22 additions and 3 deletions
25
build.zig
25
build.zig
|
@ -1,5 +1,6 @@
|
||||||
const builds = @import("std").build;
|
const std = @import("std");
|
||||||
const Builder = @import("std").build.Builder;
|
const builds = std.build;
|
||||||
|
const Builder = std.build.Builder;
|
||||||
|
|
||||||
fn setupLinks(step: *builds.LibExeObjStep) void {
|
fn setupLinks(step: *builds.LibExeObjStep) void {
|
||||||
step.linkSystemLibrary("c");
|
step.linkSystemLibrary("c");
|
||||||
|
@ -11,8 +12,26 @@ fn setupLinks(step: *builds.LibExeObjStep) void {
|
||||||
step.linkSystemLibrary("GraphicsMagickWand");
|
step.linkSystemLibrary("GraphicsMagickWand");
|
||||||
step.linkSystemLibrary("GraphicsMagick");
|
step.linkSystemLibrary("GraphicsMagick");
|
||||||
|
|
||||||
step.addIncludeDir("/usr/include/lilv-0");
|
|
||||||
step.addIncludeDir("/usr/include/GraphicsMagick");
|
step.addIncludeDir("/usr/include/GraphicsMagick");
|
||||||
|
|
||||||
|
const possible_lilv_include_dirs = [_][]const u8{
|
||||||
|
"/usr/include/lilv-0",
|
||||||
|
"/usr/include/lilv-0/lilv",
|
||||||
|
};
|
||||||
|
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| {
|
||||||
|
continue;
|
||||||
|
};
|
||||||
|
possible_dir.close();
|
||||||
|
found_any_lilv = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!found_any_lilv) {
|
||||||
|
std.debug.warn("No LILV library was found :(\n");
|
||||||
|
@panic("no lilv found");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn build(b: *Builder) void {
|
pub fn build(b: *Builder) void {
|
||||||
|
|
Loading…
Reference in a new issue