mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-13 23:36:09 +03:00
Add include paths to more modules in pkg/
This commit is contained in:
@ -5,7 +5,7 @@ pub fn build(b: *std.Build) !void {
|
||||
const target = b.standardTargetOptions(.{});
|
||||
const optimize = b.standardOptimizeOption(.{});
|
||||
|
||||
_ = b.addModule("cimgui", .{ .root_source_file = .{ .path = "main.zig" } });
|
||||
const module = b.addModule("cimgui", .{ .root_source_file = .{ .path = "main.zig" } });
|
||||
|
||||
const imgui = b.dependency("imgui", .{});
|
||||
const freetype = b.dependency("freetype", .{
|
||||
@ -26,6 +26,7 @@ pub fn build(b: *std.Build) !void {
|
||||
}
|
||||
|
||||
lib.addIncludePath(imgui.path(""));
|
||||
module.addIncludePath(.{ .path = "vendor" });
|
||||
|
||||
var flags = std.ArrayList([]const u8).init(b.allocator);
|
||||
defer flags.deinit();
|
||||
|
@ -36,6 +36,7 @@ pub fn build(b: *std.Build) !void {
|
||||
|
||||
const freetype_dep = b.dependency("freetype", .{ .target = target, .optimize = optimize });
|
||||
lib.linkLibrary(freetype_dep.artifact("freetype"));
|
||||
module.addIncludePath(freetype_dep.builder.dependency("freetype", .{}).path("include"));
|
||||
|
||||
var flags = std.ArrayList([]const u8).init(b.allocator);
|
||||
defer flags.deinit();
|
||||
|
@ -1,5 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn build(b: *std.Build) !void {
|
||||
_ = b.addModule("opengl", .{ .root_source_file = .{ .path = "main.zig" } });
|
||||
const module = b.addModule("opengl", .{ .root_source_file = .{ .path = "main.zig" } });
|
||||
module.addIncludePath(.{ .path = "../../vendor/glad/include" });
|
||||
}
|
||||
|
@ -13,12 +13,14 @@ pub fn build(b: *std.Build) !void {
|
||||
.optimize = optimize,
|
||||
});
|
||||
lib.linkLibC();
|
||||
if (!(target.result.os.tag == .windows)) {
|
||||
if (target.result.os.tag != .windows) {
|
||||
lib.linkSystemLibrary("pthread");
|
||||
}
|
||||
|
||||
lib.addIncludePath(upstream.path(""));
|
||||
lib.addIncludePath(.{ .path = "" });
|
||||
module.addIncludePath(upstream.path("pixman"));
|
||||
module.addIncludePath(.{ .path = "" });
|
||||
|
||||
var flags = std.ArrayList([]const u8).init(b.allocator);
|
||||
defer flags.deinit();
|
||||
@ -50,12 +52,11 @@ pub fn build(b: *std.Build) !void {
|
||||
});
|
||||
}
|
||||
|
||||
for (srcs) |src| {
|
||||
lib.addCSourceFile(.{
|
||||
.file = upstream.path(src),
|
||||
lib.addCSourceFiles(.{
|
||||
.dependency = upstream,
|
||||
.files = srcs,
|
||||
.flags = flags.items,
|
||||
});
|
||||
}
|
||||
|
||||
lib.installHeader("pixman-version.h", "pixman-version.h");
|
||||
lib.installHeadersDirectoryOptions(.{
|
||||
|
@ -4,9 +4,11 @@ pub fn build(b: *std.Build) !void {
|
||||
const target = b.standardTargetOptions(.{});
|
||||
const optimize = b.standardOptimizeOption(.{});
|
||||
|
||||
_ = b.addModule("spirv_cross", .{ .root_source_file = .{ .path = "main.zig" } });
|
||||
|
||||
const upstream = b.dependency("spirv_cross", .{});
|
||||
|
||||
const module = b.addModule("spirv_cross", .{ .root_source_file = .{ .path = "main.zig" } });
|
||||
module.addIncludePath(upstream.path(""));
|
||||
|
||||
const lib = try buildSpirvCross(b, upstream, target, optimize);
|
||||
b.installArtifact(lib);
|
||||
|
||||
|
Reference in New Issue
Block a user