Skip to content
This repository has been archived by the owner on Feb 6, 2025. It is now read-only.

Commit

Permalink
glfw: add macOS 13 SDK support
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
  • Loading branch information
Stephen Gutekanst committed Jun 2, 2023
1 parent 0e3ba99 commit 100617d
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/sources_all.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// MacOS: this must be defined for system-sdk-13.3 and older.
#define __kernel_ptr_semantics

// General sources
#include "monitor.c"
#include "init.c"
Expand Down
3 changes: 3 additions & 0 deletions src/sources_macos.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// MacOS: this must be defined for system-sdk-13.3 and older.
#define __kernel_ptr_semantics

// MacOS-specific sources
#include "cocoa_time.c"
#include "posix_thread.c"
Expand Down
3 changes: 3 additions & 0 deletions src/sources_macos.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// MacOS: this must be defined for system-sdk-13.3 and older.
#define __kernel_ptr_semantics

// MacOS-specific sources
#include "cocoa_joystick.m"
#include "cocoa_init.m"
Expand Down
20 changes: 17 additions & 3 deletions system_sdk.zig
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
//! * Windows: https://github.com/hexops/sdk-windows-x86_64 (~7MB, updated DirectX headers for Zig/MinGW)
//! * Linux: https://github.com/hexops/sdk-linux-x86_64 (~40MB, X11, Wayland, etc. development libraries)
//! * MacOS (most frameworks you'd find in the XCode SDK):
//! * https://github.com/hexops/sdk-macos-11.3 (~160MB, default)
//! * https://github.com/hexops/sdk-macos-12.0 (~112MB, only if you specify a macOS 12 target triple.)
//! * https://github.com/hexops/sdk-macos-11.3 (~160MB)
//! * https://github.com/hexops/sdk-macos-12.0 (~112MB)
//! * https://github.com/hexops/sdk-macos-13.3 (~160MB)
//!
//! You may supply your own SDKs via the Options struct if needed, although the Mach versions above
//! will generally work for most OpenGL/Vulkan applications.
Expand Down Expand Up @@ -43,6 +44,19 @@ pub const Options = struct {
};

sdk_list: []const Sdk = &.{
.{
.name = "sdk-macos-13.3",
.git_addr = "https://github.com/hexops/sdk-macos-13.3",
.git_revision = "1615cd09b3a42ae590e05e63251a0e9fbc47bab5",
.cpu_arch = &.{ .aarch64, .x86_64 },
.os_tag = .macos,
.os_version = .{
.semver = .{
.min = .{ .major = 13, .minor = 0 },
.max = .{ .major = 14, .minor = std.math.maxInt(u32) },
},
},
},
.{
.name = "sdk-macos-12.0",
.git_addr = "https://github.com/hexops/sdk-macos-12.0",
Expand All @@ -52,7 +66,7 @@ pub const Options = struct {
.os_version = .{
.semver = .{
.min = .{ .major = 12, .minor = 0 },
.max = .{ .major = 13, .minor = std.math.maxInt(u32) },
.max = .{ .major = 12, .minor = std.math.maxInt(u32) },
},
},
},
Expand Down

0 comments on commit 100617d

Please sign in to comment.