mirror of
https://github.com/raysan5/raylib.git
synced 2026-03-30 12:22:02 +00:00
Fix zig build and minor improvements (#5702)
- Added zig-pkg directory to gitignore - Brought min zig version to recent nightly release these improvements were completed on - For linux build, only add rglfw.c if the platform is glfw - Add a None option to the LinuxDisplayBackend - Fixed xcode-frameworks dependency and update to using most recent commit hash
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -118,6 +118,7 @@ GTAGS
|
||||
# Zig programming language
|
||||
.zig-cache/
|
||||
zig-cache/
|
||||
zig-pkg/
|
||||
zig-out/
|
||||
build/
|
||||
build-*/
|
||||
|
||||
@@ -2,7 +2,7 @@ const std = @import("std");
|
||||
const builtin = @import("builtin");
|
||||
|
||||
/// Minimum supported version of Zig
|
||||
const min_ver = "0.16.0-dev.2349+204fa8959";
|
||||
const min_ver = "0.16.0-dev.3013+abd131e33";
|
||||
|
||||
const emccOutputDir = "zig-out" ++ std.fs.path.sep_str ++ "htmlout" ++ std.fs.path.sep_str;
|
||||
const emccOutputFile = "index.html";
|
||||
@@ -264,7 +264,10 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
|
||||
|
||||
setDesktopPlatform(raylib, .android);
|
||||
} else {
|
||||
try c_source_files.append(b.allocator, "src/rglfw.c");
|
||||
switch (options.platform) {
|
||||
.glfw => try c_source_files.append(b.allocator, "src/rglfw.c"),
|
||||
.rgfw, .sdl, .drm, .android => {},
|
||||
}
|
||||
|
||||
if (options.linux_display_backend == .X11 or options.linux_display_backend == .Both) {
|
||||
raylib.root_module.addCMacro("_GLFW_X11", "");
|
||||
@@ -434,6 +437,7 @@ pub const OpenglVersion = enum {
|
||||
};
|
||||
|
||||
pub const LinuxDisplayBackend = enum {
|
||||
None,
|
||||
X11,
|
||||
Wayland,
|
||||
Both,
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
.dependencies = .{
|
||||
.xcode_frameworks = .{
|
||||
.url = "https://pkg.machengine.org/xcode-frameworks/9a45f3ac977fd25dff77e58c6de1870b6808c4a7.tar.gz",
|
||||
.hash = "122098b9174895f9708bc824b0f9e550c401892c40a900006459acf2cbf78acd99bb",
|
||||
.url = "https://pkg.machengine.org/xcode-frameworks/8a1cfb373587ea4c9bb1468b7c986462d8d4e10e.tar.gz",
|
||||
.hash = "N-V-__8AALShqgXkvqYU6f__FrA22SMWmi2TXCJjNTO1m8XJ",
|
||||
.lazy = true,
|
||||
},
|
||||
.emsdk = .{
|
||||
|
||||
Reference in New Issue
Block a user