Properly specify pixman include

This commit is contained in:
Isaac Freund 2020-04-09 00:05:28 +02:00
parent 0038a56a62
commit 6c23f3eefd
No known key found for this signature in database
GPG key ID: 86DED400DDFD7A11

View file

@ -14,15 +14,17 @@ pub fn build(b: *Builder) void {
const exe = b.addExecutable("river", "src/main.zig"); const exe = b.addExecutable("river", "src/main.zig");
exe.setTarget(target); exe.setTarget(target);
exe.setBuildMode(mode); 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.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("wayland-server");
exe.linkSystemLibrary("wlroots"); exe.linkSystemLibrary("wlroots");
exe.linkSystemLibrary("xkbcommon"); exe.linkSystemLibrary("xkbcommon");
exe.install(); exe.install();
const run_cmd = exe.run(); const run_cmd = exe.run();
@ -34,12 +36,13 @@ pub fn build(b: *Builder) void {
const test_exe = b.addTest("src/test_main.zig"); const test_exe = b.addTest("src/test_main.zig");
test_exe.setTarget(target); test_exe.setTarget(target);
test_exe.setBuildMode(mode); 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.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("wayland-server");
test_exe.linkSystemLibrary("wlroots"); test_exe.linkSystemLibrary("wlroots");
test_exe.linkSystemLibrary("xkbcommon"); test_exe.linkSystemLibrary("xkbcommon");