From 96452637d979da3a37d0af79df32a83a935d6f85 Mon Sep 17 00:00:00 2001 From: Scribe of the Ziggurat <72305366+zigster64@users.noreply.github.com> Date: Wed, 9 Feb 2022 17:23:14 +1000 Subject: [PATCH] Add BSD support for zig builds (#2332) - Adds a new OS clause to build.zig for the BSDs - Tested on my FreeBSD box using https://github.com/Not-Nik/raylib-zig - All demos build and render just fine. Nice ! --- src/build.zig | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/build.zig b/src/build.zig index 915d33a8..61c0e662 100644 --- a/src/build.zig +++ b/src/build.zig @@ -47,6 +47,19 @@ pub fn Pkg(srcdir: []const u8) type { raylib.linkSystemLibrary("m"); raylib.linkSystemLibrary("X11"); }, + .freebsd, .openbsd, .netbsd, .dragonfly => { + raylib.addCSourceFiles(&.{srcdir ++ "/rglfw.c"}, raylib_flags); + raylib.linkSystemLibrary("GL"); + raylib.linkSystemLibrary("rt"); + raylib.linkSystemLibrary("dl"); + raylib.linkSystemLibrary("m"); + raylib.linkSystemLibrary("X11"); + raylib.linkSystemLibrary("Xrandr"); + raylib.linkSystemLibrary("Xinerama"); + raylib.linkSystemLibrary("Xi"); + raylib.linkSystemLibrary("Xxf86vm"); + raylib.linkSystemLibrary("Xcursor"); + }, .macos => { // On macos rglfw.c include Objective-C files. const raylib_flags_extra_macos = &[_][]const u8{