mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
build: add -Dxcframework-target to specify the target for builds
This commit is contained in:
@ -98,7 +98,7 @@ pub fn build(b: *std.Build) !void {
|
||||
const xcframework = try buildpkg.GhosttyXCFramework.init(
|
||||
b,
|
||||
&deps,
|
||||
.universal,
|
||||
config.xcframework_target,
|
||||
);
|
||||
xcframework.install();
|
||||
|
||||
|
@ -9,6 +9,7 @@ const apprt = @import("../apprt.zig");
|
||||
const font = @import("../font/main.zig");
|
||||
const rendererpkg = @import("../renderer.zig");
|
||||
const Command = @import("../Command.zig");
|
||||
const XCFramework = @import("GhosttyXCFramework.zig");
|
||||
const WasmTarget = @import("../os/wasm/target.zig").Target;
|
||||
|
||||
const gtk = @import("gtk.zig");
|
||||
@ -24,6 +25,7 @@ const app_version: std.SemanticVersion = .{ .major = 1, .minor = 1, .patch = 4 }
|
||||
/// Standard build configuration options.
|
||||
optimize: std.builtin.OptimizeMode,
|
||||
target: std.Build.ResolvedTarget,
|
||||
xcframework_target: XCFramework.Target = .universal,
|
||||
wasm_target: WasmTarget,
|
||||
|
||||
/// Comptime interfaces
|
||||
@ -109,6 +111,14 @@ pub fn init(b: *std.Build) !Config {
|
||||
.env = env,
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------
|
||||
// Target-specific properties
|
||||
config.xcframework_target = b.option(
|
||||
XCFramework.Target,
|
||||
"xcframework-target",
|
||||
"The target for the xcframework.",
|
||||
) orelse .universal;
|
||||
|
||||
//---------------------------------------------------------------
|
||||
// Comptime Interfaces
|
||||
config.font_backend = b.option(
|
||||
|
Reference in New Issue
Block a user