mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
pkg/sentry: fix darwin lib builds
This commit is contained in:
@ -7,6 +7,14 @@ pub fn build(b: *std.Build) !void {
|
||||
const transport = b.option(Transport, "transport", "Transport") orelse .none;
|
||||
|
||||
const upstream = b.dependency("sentry", .{});
|
||||
|
||||
const module = b.addModule("sentry", .{
|
||||
.root_source_file = b.path("main.zig"),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
});
|
||||
module.addIncludePath(upstream.path("include"));
|
||||
|
||||
const lib = b.addStaticLibrary(.{
|
||||
.name = "sentry",
|
||||
.target = target,
|
||||
@ -15,9 +23,11 @@ pub fn build(b: *std.Build) !void {
|
||||
lib.linkLibC();
|
||||
lib.addIncludePath(upstream.path("include"));
|
||||
lib.addIncludePath(upstream.path("src"));
|
||||
|
||||
const module = b.addModule("sentry", .{ .root_source_file = b.path("main.zig") });
|
||||
module.addIncludePath(upstream.path("include"));
|
||||
if (target.result.isDarwin()) {
|
||||
const apple_sdk = @import("apple_sdk");
|
||||
try apple_sdk.addPaths(b, &lib.root_module);
|
||||
try apple_sdk.addPaths(b, module);
|
||||
}
|
||||
|
||||
var flags = std.ArrayList([]const u8).init(b.allocator);
|
||||
defer flags.deinit();
|
||||
|
@ -7,5 +7,7 @@
|
||||
.url = "https://github.com/getsentry/sentry-native/archive/refs/tags/0.7.8.tar.gz",
|
||||
.hash = "1220446be831adcca918167647c06c7b825849fa3fba5f22da394667974537a9c77e",
|
||||
},
|
||||
|
||||
.apple_sdk = .{ .path = "../apple-sdk" },
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user