all: update to use latest Zig master APIs (#521)
Co-authored-by: Scott Johnson <scott.johnson@furniturerow.com>
This commit is contained in:
parent
0e71daf504
commit
46c4ea4ebd
4 changed files with 5 additions and 5 deletions
|
|
@ -236,7 +236,7 @@ pub const App = struct {
|
|||
deps: ?[]const Pkg = null,
|
||||
res_dirs: ?[]const []const u8 = null,
|
||||
}) App {
|
||||
const target = (std.zig.system.NativeTargetInfo.detect(b.allocator, options.target) catch unreachable).target;
|
||||
const target = (std.zig.system.NativeTargetInfo.detect(options.target) catch unreachable).target;
|
||||
const platform = Platform.fromTarget(target);
|
||||
|
||||
var deps = std.ArrayList(std.build.Pkg).init(b.allocator);
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ pub fn buildFreetype(b: *Builder, mode: std.builtin.Mode, target: std.zig.CrossT
|
|||
if (options.brotli)
|
||||
lib.defineCMacro("FT_REQUIRE_BROTLI", "1");
|
||||
|
||||
const target_info = (std.zig.system.NativeTargetInfo.detect(b.allocator, target) catch unreachable).target;
|
||||
const target_info = (std.zig.system.NativeTargetInfo.detect(target) catch unreachable).target;
|
||||
|
||||
if (target_info.os.tag == .windows) {
|
||||
lib.addCSourceFile(ft_root ++ "/builds/windows/ftsystem.c", &.{});
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ pub const Options = struct {
|
|||
};
|
||||
|
||||
pub fn include(b: *Builder, step: *std.build.LibExeObjStep, options: Options) void {
|
||||
const target = (std.zig.system.NativeTargetInfo.detect(b.allocator, step.target) catch unreachable).target;
|
||||
const target = (std.zig.system.NativeTargetInfo.detect(step.target) catch unreachable).target;
|
||||
switch (target.os.tag) {
|
||||
.windows => includeSdkWindowsX8664(b, step, options),
|
||||
.macos => includeSdkMacOS(b, step, options),
|
||||
|
|
@ -76,7 +76,7 @@ pub fn include(b: *Builder, step: *std.build.LibExeObjStep, options: Options) vo
|
|||
}
|
||||
|
||||
fn includeSdkMacOS(b: *Builder, step: *std.build.LibExeObjStep, options: Options) void {
|
||||
const target = (std.zig.system.NativeTargetInfo.detect(b.allocator, step.target) catch unreachable).target;
|
||||
const target = (std.zig.system.NativeTargetInfo.detect(step.target) catch unreachable).target;
|
||||
const mac_12 = target.os.version_range.semver.isAtLeast(.{ .major = 12, .minor = 0 }) orelse false;
|
||||
const sdk_name = if (mac_12) options.macos_sdk_12 else options.macos_sdk_11;
|
||||
const sdk_revision = if (mac_12) options.macos_sdk_12_revision else options.macos_sdk_11_revision;
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ fn buildSoundIo(b: *Builder, mode: std.builtin.Mode, target: std.zig.CrossTarget
|
|||
lib.addIncludePath(soundio_path);
|
||||
lib.addCSourceFiles(soundio_sources, &.{});
|
||||
|
||||
const target_info = (std.zig.system.NativeTargetInfo.detect(b.allocator, target) catch unreachable).target;
|
||||
const target_info = (std.zig.system.NativeTargetInfo.detect(target) catch unreachable).target;
|
||||
if (target_info.isDarwin()) {
|
||||
lib.addCSourceFile(soundio_path ++ "/src/coreaudio.c", &.{});
|
||||
lib.linkFramework("AudioToolbox");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue