mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-29 02:33:55 +00:00
build: add libintl for macOS builds
This commit is contained in:
@@ -359,6 +359,12 @@ pub fn build(b: *std.Build) !void {
|
||||
lib.addIncludePath(b.path(""));
|
||||
lib.addIncludePath(upstream.path("gettext-runtime/intl"));
|
||||
lib.addIncludePath(upstream.path("gettext-runtime/intl/gnulib-lib"));
|
||||
|
||||
if (target.result.isDarwin()) {
|
||||
const apple_sdk = @import("apple_sdk");
|
||||
try apple_sdk.addPaths(b, &lib.root_module);
|
||||
}
|
||||
|
||||
lib.addConfigHeader(config);
|
||||
lib.addCSourceFiles(.{
|
||||
.root = upstream.path("gettext-runtime/intl"),
|
||||
@@ -389,12 +395,16 @@ const srcs: []const []const u8 = &.{
|
||||
"localealias.c",
|
||||
"log.c",
|
||||
"ngettext.c",
|
||||
"osdep.c",
|
||||
"plural-exp.c",
|
||||
"plural.c",
|
||||
"printf.c",
|
||||
"setlocale.c",
|
||||
"textdomain.c",
|
||||
"version.c",
|
||||
"compat.c",
|
||||
|
||||
// Not needed for macOS, but we might need them for other platforms.
|
||||
// If we expand this to support other platforms, we should uncomment
|
||||
// these.
|
||||
// "osdep.c",
|
||||
// "printf.c",
|
||||
};
|
||||
|
||||
@@ -7,5 +7,7 @@
|
||||
.url = "https://deps.files.ghostty.org/gettext-0.24.tar.gz",
|
||||
.hash = "1220f870c853529233ea64a108acaaa81f8d06d7ff4b66c76930be7d78d508aff7a2",
|
||||
},
|
||||
|
||||
.apple_sdk = .{ .path = "../apple-sdk" },
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user