mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
pkg/apple-sdk: always require a module
This commit is contained in:
@ -792,7 +792,7 @@ fn addDeps(
|
||||
// We always require the system SDK so that our system headers are available.
|
||||
// This makes things like `os/log.h` available for cross-compiling.
|
||||
if (step.rootModuleTarget().isDarwin()) {
|
||||
try @import("apple_sdk").addPaths(b, step);
|
||||
try @import("apple_sdk").addPaths(b, &step.root_module);
|
||||
}
|
||||
|
||||
// We always need the Zig packages
|
||||
|
@ -7,7 +7,7 @@ pub fn build(b: *std.Build) !void {
|
||||
_ = optimize;
|
||||
}
|
||||
|
||||
pub fn addPaths(b: *std.Build, step: anytype) !void {
|
||||
pub fn addPaths(b: *std.Build, m: *std.Build.Module) !void {
|
||||
// The active SDK we want to use
|
||||
const sdk = "MacOSX14.sdk";
|
||||
|
||||
@ -19,19 +19,19 @@ pub fn addPaths(b: *std.Build, step: anytype) !void {
|
||||
" \r\n",
|
||||
);
|
||||
|
||||
step.addSystemFrameworkPath(.{
|
||||
m.addSystemFrameworkPath(.{
|
||||
.cwd_relative = b.pathJoin(&.{
|
||||
path,
|
||||
"Platforms/MacOSX.platform/Developer/SDKs/" ++ sdk ++ "/System/Library/Frameworks",
|
||||
}),
|
||||
});
|
||||
step.addSystemIncludePath(.{
|
||||
m.addSystemIncludePath(.{
|
||||
.cwd_relative = b.pathJoin(&.{
|
||||
path,
|
||||
"Platforms/MacOSX.platform/Developer/SDKs/" ++ sdk ++ "/usr/include",
|
||||
}),
|
||||
});
|
||||
step.addLibraryPath(.{
|
||||
m.addLibraryPath(.{
|
||||
.cwd_relative = b.pathJoin(&.{
|
||||
path,
|
||||
"Platforms/MacOSX.platform/Developer/SDKs/" ++ sdk ++ "/usr/lib",
|
||||
|
@ -60,7 +60,7 @@ pub fn build(b: *std.Build) !void {
|
||||
|
||||
if (target.result.isDarwin()) {
|
||||
if (!target.query.isNative()) {
|
||||
try @import("apple_sdk").addPaths(b, lib);
|
||||
try @import("apple_sdk").addPaths(b, &lib.root_module);
|
||||
try @import("apple_sdk").addPaths(b, module);
|
||||
}
|
||||
lib.addCSourceFile(.{
|
||||
|
@ -61,7 +61,7 @@ pub fn build(b: *std.Build) !void {
|
||||
});
|
||||
if (coretext_enabled) {
|
||||
try flags.appendSlice(&.{"-DHAVE_CORETEXT=1"});
|
||||
try apple_sdk.addPaths(b, lib);
|
||||
try apple_sdk.addPaths(b, &lib.root_module);
|
||||
try apple_sdk.addPaths(b, module);
|
||||
lib.linkFramework("ApplicationServices");
|
||||
module.linkFramework("ApplicationServices", .{});
|
||||
|
@ -38,7 +38,7 @@ pub fn build(b: *std.Build) !void {
|
||||
module.linkFramework("CoreVideo", .{});
|
||||
|
||||
if (!target.query.isNative()) {
|
||||
try apple_sdk.addPaths(b, lib);
|
||||
try apple_sdk.addPaths(b, &lib.root_module);
|
||||
try apple_sdk.addPaths(b, module);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user