mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-04-20 08:28:51 +03:00

Fixes #6727 The major change in this commit is to consolidate all the C imports in a single decl in main.zig. This is required for Zig 0.14. Without it, the problem in #6727 will happen. I was never able to minimize why this happens in order to open a Zig bug. Beyond this, I fixed the build.zig and build.zig.zon to work with Zig 0.14 so that we can test building `pkg/macos` in isolation. There are no downstream impacting changes in the build.zig files.
32 lines
1011 B
Zig
32 lines
1011 B
Zig
const builtin = @import("builtin");
|
|
|
|
pub const carbon = @import("carbon.zig");
|
|
pub const foundation = @import("foundation.zig");
|
|
pub const animation = @import("animation.zig");
|
|
pub const dispatch = @import("dispatch.zig");
|
|
pub const graphics = @import("graphics.zig");
|
|
pub const os = @import("os.zig");
|
|
pub const text = @import("text.zig");
|
|
pub const video = @import("video.zig");
|
|
|
|
// All of our C imports consolidated into one place. We used to
|
|
// import them one by one in each package but Zig 0.14 has some
|
|
// kind of issue with that I wasn't able to minimize.
|
|
pub const c = @cImport({
|
|
@cInclude("CoreFoundation/CoreFoundation.h");
|
|
@cInclude("CoreGraphics/CoreGraphics.h");
|
|
@cInclude("CoreText/CoreText.h");
|
|
@cInclude("CoreVideo/CoreVideo.h");
|
|
@cInclude("QuartzCore/CALayer.h");
|
|
@cInclude("dispatch/dispatch.h");
|
|
@cInclude("os/log.h");
|
|
|
|
if (builtin.os.tag == .macos) {
|
|
@cInclude("Carbon/Carbon.h");
|
|
}
|
|
});
|
|
|
|
test {
|
|
@import("std").testing.refAllDecls(@This());
|
|
}
|