瀏覽代碼

[build] building with zig-master 0.16.0-dev.2349+204fa8959.

pull/5520/head
Daniel Tasada 1 天之前
父節點
當前提交
2b180213bc
共有 1 個檔案被更改,包括 5 行新增5 行删除
  1. +5
    -5
      build.zig

+ 5
- 5
build.zig 查看文件

@ -197,7 +197,7 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
}
var c_source_files: std.ArrayList([]const u8) = try .initCapacity(b.allocator, 2);
c_source_files.appendSliceAssumeCapacity(&.{ "src/rcore.c" });
c_source_files.appendSliceAssumeCapacity(&.{"src/rcore.c"});
if (options.rshapes) {
try c_source_files.append(b.allocator, "src/rshapes.c");
@ -448,7 +448,7 @@ pub const Options = struct {
.linux_display_backend = b.option(LinuxDisplayBackend, "linux_display_backend", "Linux display backend to use") orelse defaults.linux_display_backend,
.opengl_version = b.option(OpenglVersion, "opengl_version", "OpenGL version to use") orelse defaults.opengl_version,
.config = b.option([]const u8, "config", "Compile with custom define macros overriding config.h") orelse &.{},
.android_ndk = b.option([]const u8, "android_ndk", "specify path to android ndk") orelse std.process.getEnvVarOwned(b.allocator, "ANDROID_NDK_HOME") catch "",
.android_ndk = b.option([]const u8, "android_ndk", "specify path to android ndk") orelse b.graph.environ_map.get("ANDROID_NDK_HOME") orelse "",
.android_api_version = b.option([]const u8, "android_api_version", "specify target android API level") orelse defaults.android_api_version,
};
}
@ -523,11 +523,11 @@ fn addExamples(
) !*std.Build.Step {
const all = b.step(module, "All " ++ module ++ " examples");
const module_subpath = b.pathJoin(&.{ "examples", module });
var dir = try std.fs.cwd().openDir(b.pathFromRoot(module_subpath), .{ .iterate = true });
defer dir.close();
var dir = try std.Io.Dir.cwd().openDir(b.graph.io, b.pathFromRoot(module_subpath), .{ .iterate = true });
defer dir.close(b.graph.io);
var iter = dir.iterate();
while (try iter.next()) |entry| {
while (try iter.next(b.graph.io)) |entry| {
if (entry.kind != .file) continue;
const extension_idx = std.mem.lastIndexOf(u8, entry.name, ".c") orelse continue;
const name = entry.name[0..extension_idx];

Loading…
取消
儲存