浏览代码

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 !
pull/2337/head
Scribe of the Ziggurat 3 年前
committed by GitHub
父节点
当前提交
96452637d9
找不到此签名对应的密钥 GPG 密钥 ID: 4AEE18F83AFDEB23
共有 1 个文件被更改,包括 13 次插入0 次删除
  1. +13
    -0
      src/build.zig

+ 13
- 0
src/build.zig 查看文件

@ -47,6 +47,19 @@ pub fn Pkg(srcdir: []const u8) type {
raylib.linkSystemLibrary("m"); raylib.linkSystemLibrary("m");
raylib.linkSystemLibrary("X11"); 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 => { .macos => {
// On macos rglfw.c include Objective-C files. // On macos rglfw.c include Objective-C files.
const raylib_flags_extra_macos = &[_][]const u8{ const raylib_flags_extra_macos = &[_][]const u8{

正在加载...
取消
保存