mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
add system SDK to build to enable cross compilation
This commit is contained in:
@ -144,7 +144,7 @@ fn addDeps(
|
|||||||
|
|
||||||
// Freetype
|
// Freetype
|
||||||
step.addPackage(freetype.pkg);
|
step.addPackage(freetype.pkg);
|
||||||
try freetype.link(b, step);
|
_ = try freetype.link(b, step);
|
||||||
|
|
||||||
// Glfw
|
// Glfw
|
||||||
step.addPackage(glfw.pkg);
|
step.addPackage(glfw.pkg);
|
||||||
@ -155,11 +155,13 @@ fn addDeps(
|
|||||||
|
|
||||||
// Libuv
|
// Libuv
|
||||||
step.addPackage(libuv.pkg);
|
step.addPackage(libuv.pkg);
|
||||||
try libuv.link(b, step);
|
var libuv_step = try libuv.link(b, step);
|
||||||
|
system_sdk.include(b, libuv_step, .{});
|
||||||
|
|
||||||
// Tracy
|
// Tracy
|
||||||
step.addPackage(tracylib.pkg);
|
step.addPackage(tracylib.pkg);
|
||||||
try tracylib.link(b, step);
|
var tracy_step = try tracylib.link(b, step);
|
||||||
|
system_sdk.include(b, tracy_step, .{});
|
||||||
}
|
}
|
||||||
|
|
||||||
fn conformanceSteps(
|
fn conformanceSteps(
|
||||||
|
@ -14,11 +14,12 @@ fn thisDir() []const u8 {
|
|||||||
return std.fs.path.dirname(@src().file) orelse ".";
|
return std.fs.path.dirname(@src().file) orelse ".";
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn link(b: *std.build.Builder, step: *std.build.LibExeObjStep) !void {
|
pub fn link(b: *std.build.Builder, step: *std.build.LibExeObjStep) !*std.build.LibExeObjStep {
|
||||||
const lib = try buildFreetype(b, step);
|
const lib = try buildFreetype(b, step);
|
||||||
step.linkLibrary(lib);
|
step.linkLibrary(lib);
|
||||||
step.addIncludePath(include_path);
|
step.addIncludePath(include_path);
|
||||||
step.addIncludePath(include_path_self);
|
step.addIncludePath(include_path_self);
|
||||||
|
return lib;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn buildFreetype(
|
pub fn buildFreetype(
|
||||||
|
@ -13,10 +13,11 @@ fn thisDir() []const u8 {
|
|||||||
return std.fs.path.dirname(@src().file) orelse ".";
|
return std.fs.path.dirname(@src().file) orelse ".";
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn link(b: *std.build.Builder, step: *std.build.LibExeObjStep) !void {
|
pub fn link(b: *std.build.Builder, step: *std.build.LibExeObjStep) !*std.build.LibExeObjStep {
|
||||||
const libuv = try buildLibuv(b, step);
|
const libuv = try buildLibuv(b, step);
|
||||||
step.linkLibrary(libuv);
|
step.linkLibrary(libuv);
|
||||||
step.addIncludePath(include_path);
|
step.addIncludePath(include_path);
|
||||||
|
return libuv;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn buildLibuv(
|
pub fn buildLibuv(
|
||||||
|
@ -12,10 +12,11 @@ fn thisDir() []const u8 {
|
|||||||
return std.fs.path.dirname(@src().file) orelse ".";
|
return std.fs.path.dirname(@src().file) orelse ".";
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn link(b: *std.build.Builder, step: *std.build.LibExeObjStep) !void {
|
pub fn link(b: *std.build.Builder, step: *std.build.LibExeObjStep) !*std.build.LibExeObjStep {
|
||||||
const tracy = try buildTracy(b, step);
|
const tracy = try buildTracy(b, step);
|
||||||
step.linkLibrary(tracy);
|
step.linkLibrary(tracy);
|
||||||
step.addIncludePath(root);
|
step.addIncludePath(root);
|
||||||
|
return tracy;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn buildTracy(
|
pub fn buildTracy(
|
||||||
|
Reference in New Issue
Block a user