소스 검색

[build.zig] check if wayland-scanner is installed (#4217)

#4150 introduced a default value for linux_display_backend,
which makes X11-only systems fail to build.
pull/4233/head
lnc3l0t 8 달 전
committed by GitHub
부모
커밋
8b714e9dd9
No known key found for this signature in database GPG 키 ID: B5690EEEBB952194
1개의 변경된 파일7개의 추가작업 그리고 0개의 파일을 삭제
  1. +7
    -0
      src/build.zig

+ 7
- 0
src/build.zig 파일 보기

@ -155,6 +155,13 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
}
if (options.linux_display_backend == .Wayland or options.linux_display_backend == .Both) {
_ = b.findProgram(&.{"wayland-scanner"}, &.{}) catch {
std.log.err(
\\ Wayland may not be installed on the system.
\\ You can switch to X11 in your `build.zig` by changing `Options.linux_display_backend`
, .{});
@panic("No Wayland");
};
raylib.defineCMacro("_GLFW_WAYLAND", null);
raylib.linkSystemLibrary("wayland-client");
raylib.linkSystemLibrary("wayland-cursor");

불러오는 중...
취소
저장