add system path for SDL2

master
Fabien Freling 2021-04-24 16:58:24 +02:00
parent 1101f71d8f
commit 14c91ed8e5
2 changed files with 4 additions and 1 deletions

View File

@ -19,6 +19,9 @@ pub fn build(b: *Builder) void {
exe.linkSystemLibrary("SDL2");
exe.linkSystemLibrary("c");
exe.addIncludeDir("/usr/include/x86_64-linux-gnu");
exe.addLibPath("/usr/lib/x86_64-linux-gnu");
exe.install();
const run_cmd = exe.run();

View File

@ -1,4 +1,4 @@
pub const c = @cImport({ @cInclude("SDL.h"); });
pub const c = @cImport({ @cInclude("SDL2/SDL.h"); });
const Color = @import("vec3.zig").Color;
pub fn setSurfacePixel(surface: *c.SDL_Surface, i: usize, j: usize, color: Color) void {