From 6c23f3eefd84c2748f5e83f8a84f0996c6a10578 Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Thu, 9 Apr 2020 00:05:28 +0200 Subject: [PATCH] Properly specify pixman include --- build.zig | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/build.zig b/build.zig index b4b7558..23ccd47 100644 --- a/build.zig +++ b/build.zig @@ -14,15 +14,17 @@ pub fn build(b: *Builder) void { const exe = b.addExecutable("river", "src/main.zig"); exe.setTarget(target); exe.setBuildMode(mode); - exe.addIncludeDir("protocol"); - exe.linkLibC(); - exe.addIncludeDir("/usr/include/pixman-1"); - exe.addCSourceFile("include/render.c", &[_][]const u8{"-std=c99"}); + exe.addIncludeDir("."); - //exe.linkSystemLibrary("pixman"); + exe.addIncludeDir("protocol"); + exe.addCSourceFile("include/render.c", &[_][]const u8{"-std=c99"}); + + exe.linkLibC(); + exe.linkSystemLibrary("pixman-1"); exe.linkSystemLibrary("wayland-server"); exe.linkSystemLibrary("wlroots"); exe.linkSystemLibrary("xkbcommon"); + exe.install(); const run_cmd = exe.run(); @@ -34,12 +36,13 @@ pub fn build(b: *Builder) void { const test_exe = b.addTest("src/test_main.zig"); test_exe.setTarget(target); test_exe.setBuildMode(mode); - test_exe.addIncludeDir("protocol"); - test_exe.linkLibC(); - test_exe.addIncludeDir("/usr/include/pixman-1"); - test_exe.addCSourceFile("include/render.c", &[_][]const u8{"-std=c99"}); + test_exe.addIncludeDir("."); - //test_exe.linkSystemLibrary("pixman"); + test_exe.addIncludeDir("protocol"); + test_exe.addCSourceFile("include/render.c", &[_][]const u8{"-std=c99"}); + + test_exe.linkLibC(); + test_exe.linkSystemLibrary("pixman-1"); test_exe.linkSystemLibrary("wayland-server"); test_exe.linkSystemLibrary("wlroots"); test_exe.linkSystemLibrary("xkbcommon");