mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-07 02:16:34 +00:00
improve building on darwin
This commit is contained in:
@@ -50,6 +50,13 @@ pub fn create(
|
||||
});
|
||||
}
|
||||
|
||||
if (target.isDarwin()) {
|
||||
try flags.appendSlice(&.{
|
||||
"-D_DARWIN_UNLIMITED_SELECT=1",
|
||||
"-D_DARWIN_USE_64_BIT_INODE=1",
|
||||
});
|
||||
}
|
||||
|
||||
// C files common to all platforms
|
||||
ret.addCSourceFiles(&.{
|
||||
root() ++ "src/fs-poll.c",
|
||||
@@ -106,6 +113,32 @@ pub fn create(
|
||||
}, flags.items);
|
||||
}
|
||||
|
||||
if (target.isDarwin() or
|
||||
target.isOpenBSD() or
|
||||
target.isNetBSD() or
|
||||
target.isFreeBSD() or
|
||||
target.isDragonFlyBSD())
|
||||
{
|
||||
ret.addCSourceFiles(&.{
|
||||
root() ++ "src/unix/bsd-ifaddrs.c",
|
||||
root() ++ "src/unix/kqueue.c",
|
||||
}, flags.items);
|
||||
}
|
||||
|
||||
if (target.isDarwin() or target.isOpenBSD()) {
|
||||
ret.addCSourceFiles(&.{
|
||||
root() ++ "src/unix/random-getentropy.c",
|
||||
}, flags.items);
|
||||
}
|
||||
|
||||
if (target.isDarwin()) {
|
||||
ret.addCSourceFiles(&.{
|
||||
root() ++ "src/unix/darwin-proctitle.c",
|
||||
root() ++ "src/unix/darwin.c",
|
||||
root() ++ "src/unix/fsevents.c",
|
||||
}, flags.items);
|
||||
}
|
||||
|
||||
ret.addIncludeDir(include_dir);
|
||||
ret.addIncludeDir(root() ++ "src");
|
||||
if (target.isWindows()) {
|
||||
|
Reference in New Issue
Block a user