mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
begin 0.13 update process -- very broken
This commit is contained in:
@ -1017,7 +1017,7 @@ fn addDeps(
|
|||||||
// on x86_64.
|
// on x86_64.
|
||||||
if (step.rootModuleTarget().os.tag == .linux) {
|
if (step.rootModuleTarget().os.tag == .linux) {
|
||||||
const triple = try step.rootModuleTarget().linuxTriple(b.allocator);
|
const triple = try step.rootModuleTarget().linuxTriple(b.allocator);
|
||||||
step.addLibraryPath(.{ .path = b.fmt("/usr/lib/{s}", .{triple}) });
|
step.addLibraryPath(b.path(b.fmt("/usr/lib/{s}", .{triple})));
|
||||||
}
|
}
|
||||||
|
|
||||||
// C files
|
// C files
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
.dependencies = .{
|
.dependencies = .{
|
||||||
// Zig libs
|
// Zig libs
|
||||||
.libxev = .{
|
.libxev = .{
|
||||||
.url = "https://github.com/mitchellh/libxev/archive/b3f9918776b8700b337b7ebe769060328fe246b0.tar.gz",
|
.url = "https://github.com/mitchellh/libxev/archive/f6a672a78436d8efee1aa847a43a900ad773618b.tar.gz",
|
||||||
.hash = "122044caf67c7833c7110dc93531031899e459a6818ed125a0bcfdb0b5243bd7700b",
|
.hash = "12207b7a5b538ffb7fb18f954ae17d2f8490b6e3778a9e30564ad82c58ee8da52361",
|
||||||
},
|
},
|
||||||
.mach_glfw = .{
|
.mach_glfw = .{
|
||||||
.url = "https://github.com/mitchellh/mach-glfw/archive/20c773d86df269722d8926f98bc8af26ebd90999.tar.gz",
|
.url = "https://github.com/mitchellh/mach-glfw/archive/20c773d86df269722d8926f98bc8af26ebd90999.tar.gz",
|
||||||
|
38
flake.lock
generated
38
flake.lock
generated
@ -3,11 +3,11 @@
|
|||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673956053,
|
"lastModified": 1696426674,
|
||||||
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
|
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||||
"owner": "edolstra",
|
"owner": "edolstra",
|
||||||
"repo": "flake-compat",
|
"repo": "flake-compat",
|
||||||
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
|
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -33,12 +33,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils": {
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1659877975,
|
"lastModified": 1705309234,
|
||||||
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
|
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -49,7 +52,7 @@
|
|||||||
},
|
},
|
||||||
"flake-utils_2": {
|
"flake-utils_2": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems"
|
"systems": "systems_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710146030,
|
"lastModified": 1710146030,
|
||||||
@ -168,6 +171,21 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"systems_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"zig": {
|
"zig": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
@ -177,11 +195,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1713659103,
|
"lastModified": 1717848532,
|
||||||
"narHash": "sha256-WgWH0HPGsxd7Ov5M4Ug7qjmxbTeG8517xO6hY3198tU=",
|
"narHash": "sha256-d+xIUvSTreHl8pAmU1fnmkfDTGQYCn2Rb/zOwByxS2M=",
|
||||||
"owner": "mitchellh",
|
"owner": "mitchellh",
|
||||||
"repo": "zig-overlay",
|
"repo": "zig-overlay",
|
||||||
"rev": "a13735003a235a2e4e202b47277129f99bfc9294",
|
"rev": "02fc5cc555fc14fda40c42d7c3250efa43812b43",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
inherit (pkgs-unstable) tracy;
|
inherit (pkgs-unstable) tracy;
|
||||||
inherit (zls.packages.${system}) zls;
|
inherit (zls.packages.${system}) zls;
|
||||||
|
|
||||||
zig = zig.packages.${system}."0.12.0";
|
zig = zig.packages.${system}."0.13.0";
|
||||||
wraptest = pkgs-stable.callPackage ./nix/wraptest.nix {};
|
wraptest = pkgs-stable.callPackage ./nix/wraptest.nix {};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
|
||||||
const module = b.addModule("cimgui", .{
|
const module = b.addModule("cimgui", .{
|
||||||
.root_source_file = .{ .path = "main.zig" },
|
.root_source_file = b.path("main.zig"),
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
@ -30,7 +30,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
lib.addIncludePath(imgui.path(""));
|
lib.addIncludePath(imgui.path(""));
|
||||||
module.addIncludePath(.{ .path = "vendor" });
|
module.addIncludePath(b.path("vendor"));
|
||||||
|
|
||||||
var flags = std.ArrayList([]const u8).init(b.allocator);
|
var flags = std.ArrayList([]const u8).init(b.allocator);
|
||||||
defer flags.deinit();
|
defer flags.deinit();
|
||||||
@ -49,7 +49,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
lib.addCSourceFile(.{ .file = .{ .path = "vendor/cimgui.cpp" }, .flags = flags.items });
|
lib.addCSourceFile(.{ .file = b.path("vendor/cimgui.cpp"), .flags = flags.items });
|
||||||
lib.addCSourceFile(.{ .file = imgui.path("imgui.cpp"), .flags = flags.items });
|
lib.addCSourceFile(.{ .file = imgui.path("imgui.cpp"), .flags = flags.items });
|
||||||
lib.addCSourceFile(.{ .file = imgui.path("imgui_draw.cpp"), .flags = flags.items });
|
lib.addCSourceFile(.{ .file = imgui.path("imgui_draw.cpp"), .flags = flags.items });
|
||||||
lib.addCSourceFile(.{ .file = imgui.path("imgui_demo.cpp"), .flags = flags.items });
|
lib.addCSourceFile(.{ .file = imgui.path("imgui_demo.cpp"), .flags = flags.items });
|
||||||
@ -80,7 +80,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
lib.installHeadersDirectory(
|
lib.installHeadersDirectory(
|
||||||
.{ .path = "vendor" },
|
b.path("vendor"),
|
||||||
"",
|
"",
|
||||||
.{ .include_extensions = &.{".h"} },
|
.{ .include_extensions = &.{".h"} },
|
||||||
);
|
);
|
||||||
@ -89,7 +89,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
|
|
||||||
const test_exe = b.addTest(.{
|
const test_exe = b.addTest(.{
|
||||||
.name = "test",
|
.name = "test",
|
||||||
.root_source_file = .{ .path = "main.zig" },
|
.root_source_file = b.path("main.zig"),
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
|
@ -13,7 +13,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
) orelse (target.result.os.tag != .windows);
|
) orelse (target.result.os.tag != .windows);
|
||||||
const freetype_enabled = b.option(bool, "enable-freetype", "Build freetype") orelse true;
|
const freetype_enabled = b.option(bool, "enable-freetype", "Build freetype") orelse true;
|
||||||
|
|
||||||
const module = b.addModule("fontconfig", .{ .root_source_file = .{ .path = "main.zig" } });
|
const module = b.addModule("fontconfig", .{ .root_source_file = b.path("main.zig") });
|
||||||
|
|
||||||
const upstream = b.dependency("fontconfig", .{});
|
const upstream = b.dependency("fontconfig", .{});
|
||||||
const lib = b.addStaticLibrary(.{
|
const lib = b.addStaticLibrary(.{
|
||||||
@ -39,9 +39,9 @@ pub fn build(b: *std.Build) !void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
lib.addIncludePath(upstream.path(""));
|
lib.addIncludePath(upstream.path(""));
|
||||||
lib.addIncludePath(.{ .path = "override/include" });
|
lib.addIncludePath(b.path("override/include"));
|
||||||
module.addIncludePath(upstream.path(""));
|
module.addIncludePath(upstream.path(""));
|
||||||
module.addIncludePath(.{ .path = "override/include" });
|
module.addIncludePath(b.path("override/include"));
|
||||||
|
|
||||||
var flags = std.ArrayList([]const u8).init(b.allocator);
|
var flags = std.ArrayList([]const u8).init(b.allocator);
|
||||||
defer flags.deinit();
|
defer flags.deinit();
|
||||||
@ -172,7 +172,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
|
|
||||||
const test_exe = b.addTest(.{
|
const test_exe = b.addTest(.{
|
||||||
.name = "test",
|
.name = "test",
|
||||||
.root_source_file = .{ .path = "main.zig" },
|
.root_source_file = b.path("main.zig"),
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
|
@ -5,7 +5,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
const libpng_enabled = b.option(bool, "enable-libpng", "Build libpng") orelse false;
|
const libpng_enabled = b.option(bool, "enable-libpng", "Build libpng") orelse false;
|
||||||
|
|
||||||
const module = b.addModule("freetype", .{ .root_source_file = .{ .path = "main.zig" } });
|
const module = b.addModule("freetype", .{ .root_source_file = b.path("main.zig") });
|
||||||
|
|
||||||
const upstream = b.dependency("freetype", .{});
|
const upstream = b.dependency("freetype", .{});
|
||||||
const lib = b.addStaticLibrary(.{
|
const lib = b.addStaticLibrary(.{
|
||||||
@ -21,7 +21,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
module.addIncludePath(upstream.path("include"));
|
module.addIncludePath(upstream.path("include"));
|
||||||
module.addIncludePath(.{ .path = "" });
|
module.addIncludePath(b.path(""));
|
||||||
|
|
||||||
// Dependencies
|
// Dependencies
|
||||||
const zlib_dep = b.dependency("zlib", .{ .target = target, .optimize = optimize });
|
const zlib_dep = b.dependency("zlib", .{ .target = target, .optimize = optimize });
|
||||||
@ -81,7 +81,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
|
|
||||||
lib.installHeader(.{ .path = "freetype-zig.h" }, "freetype-zig.h");
|
lib.installHeader(b.path("freetype-zig.h"), "freetype-zig.h");
|
||||||
lib.installHeadersDirectory(
|
lib.installHeadersDirectory(
|
||||||
upstream.path("include"),
|
upstream.path("include"),
|
||||||
"",
|
"",
|
||||||
@ -93,7 +93,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
if (target.query.isNative()) {
|
if (target.query.isNative()) {
|
||||||
const test_exe = b.addTest(.{
|
const test_exe = b.addTest(.{
|
||||||
.name = "test",
|
.name = "test",
|
||||||
.root_source_file = .{ .path = "main.zig" },
|
.root_source_file = b.path("main.zig"),
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
|
@ -5,7 +5,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
|
||||||
const module = b.addModule("glslang", .{
|
const module = b.addModule("glslang", .{
|
||||||
.root_source_file = .{ .path = "main.zig" },
|
.root_source_file = b.path("main.zig"),
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
@ -15,7 +15,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
b.installArtifact(lib);
|
b.installArtifact(lib);
|
||||||
|
|
||||||
module.addIncludePath(upstream.path(""));
|
module.addIncludePath(upstream.path(""));
|
||||||
module.addIncludePath(.{ .path = "override" });
|
module.addIncludePath(b.path("override"));
|
||||||
if (target.result.isDarwin()) {
|
if (target.result.isDarwin()) {
|
||||||
const apple_sdk = @import("apple_sdk");
|
const apple_sdk = @import("apple_sdk");
|
||||||
try apple_sdk.addPaths(b, module);
|
try apple_sdk.addPaths(b, module);
|
||||||
@ -24,7 +24,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
if (target.query.isNative()) {
|
if (target.query.isNative()) {
|
||||||
const test_exe = b.addTest(.{
|
const test_exe = b.addTest(.{
|
||||||
.name = "test",
|
.name = "test",
|
||||||
.root_source_file = .{ .path = "main.zig" },
|
.root_source_file = b.path("main.zig"),
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
@ -52,7 +52,7 @@ fn buildGlslang(
|
|||||||
lib.linkLibC();
|
lib.linkLibC();
|
||||||
lib.linkLibCpp();
|
lib.linkLibCpp();
|
||||||
lib.addIncludePath(upstream.path(""));
|
lib.addIncludePath(upstream.path(""));
|
||||||
lib.addIncludePath(.{ .path = "override" });
|
lib.addIncludePath(b.path("override"));
|
||||||
if (target.result.isDarwin()) {
|
if (target.result.isDarwin()) {
|
||||||
const apple_sdk = @import("apple_sdk");
|
const apple_sdk = @import("apple_sdk");
|
||||||
try apple_sdk.addPaths(b, &lib.root_module);
|
try apple_sdk.addPaths(b, &lib.root_module);
|
||||||
|
@ -17,7 +17,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
const upstream = b.dependency("harfbuzz", .{});
|
const upstream = b.dependency("harfbuzz", .{});
|
||||||
|
|
||||||
const module = b.addModule("harfbuzz", .{
|
const module = b.addModule("harfbuzz", .{
|
||||||
.root_source_file = .{ .path = "main.zig" },
|
.root_source_file = b.path("main.zig"),
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
.imports = &.{
|
.imports = &.{
|
||||||
@ -91,7 +91,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
{
|
{
|
||||||
const test_exe = b.addTest(.{
|
const test_exe = b.addTest(.{
|
||||||
.name = "test",
|
.name = "test",
|
||||||
.root_source_file = .{ .path = "main.zig" },
|
.root_source_file = b.path("main.zig"),
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
|
@ -7,7 +7,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
const upstream = b.dependency("highway", .{});
|
const upstream = b.dependency("highway", .{});
|
||||||
|
|
||||||
const module = b.addModule("highway", .{
|
const module = b.addModule("highway", .{
|
||||||
.root_source_file = .{ .path = "main.zig" },
|
.root_source_file = b.path("main.zig"),
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
@ -95,7 +95,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
{
|
{
|
||||||
const test_exe = b.addTest(.{
|
const test_exe = b.addTest(.{
|
||||||
.name = "test",
|
.name = "test",
|
||||||
.root_source_file = .{ .path = "main.zig" },
|
.root_source_file = b.path("main.zig"),
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
|
@ -23,7 +23,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
const zlib_dep = b.dependency("zlib", .{ .target = target, .optimize = optimize });
|
const zlib_dep = b.dependency("zlib", .{ .target = target, .optimize = optimize });
|
||||||
lib.linkLibrary(zlib_dep.artifact("z"));
|
lib.linkLibrary(zlib_dep.artifact("z"));
|
||||||
lib.addIncludePath(upstream.path(""));
|
lib.addIncludePath(upstream.path(""));
|
||||||
lib.addIncludePath(.{ .path = "" });
|
lib.addIncludePath(b.path(""));
|
||||||
|
|
||||||
var flags = std.ArrayList([]const u8).init(b.allocator);
|
var flags = std.ArrayList([]const u8).init(b.allocator);
|
||||||
defer flags.deinit();
|
defer flags.deinit();
|
||||||
@ -40,7 +40,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
.flags = flags.items,
|
.flags = flags.items,
|
||||||
});
|
});
|
||||||
|
|
||||||
lib.installHeader(.{ .path = "pnglibconf.h" }, "pnglibconf.h");
|
lib.installHeader(b.path("pnglibconf.h"), "pnglibconf.h");
|
||||||
lib.installHeadersDirectory(
|
lib.installHeadersDirectory(
|
||||||
upstream.path(""),
|
upstream.path(""),
|
||||||
"",
|
"",
|
||||||
|
@ -14,12 +14,12 @@ pub fn build(b: *std.Build) !void {
|
|||||||
lib.linkLibC();
|
lib.linkLibC();
|
||||||
|
|
||||||
lib.addIncludePath(upstream.path("include"));
|
lib.addIncludePath(upstream.path("include"));
|
||||||
lib.addIncludePath(.{ .path = "override/include" });
|
lib.addIncludePath(b.path("override/include"));
|
||||||
if (target.result.os.tag == .windows) {
|
if (target.result.os.tag == .windows) {
|
||||||
lib.addIncludePath(.{ .path = "override/config/win32" });
|
lib.addIncludePath(b.path("override/config/win32"));
|
||||||
lib.linkSystemLibrary("ws2_32");
|
lib.linkSystemLibrary("ws2_32");
|
||||||
} else {
|
} else {
|
||||||
lib.addIncludePath(.{ .path = "override/config/posix" });
|
lib.addIncludePath(b.path("override/config/posix"));
|
||||||
}
|
}
|
||||||
|
|
||||||
var flags = std.ArrayList([]const u8).init(b.allocator);
|
var flags = std.ArrayList([]const u8).init(b.allocator);
|
||||||
@ -101,7 +101,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
});
|
});
|
||||||
|
|
||||||
lib.installHeader(
|
lib.installHeader(
|
||||||
.{ .path = "override/include/libxml/xmlversion.h" },
|
b.path("override/include/libxml/xmlversion.h"),
|
||||||
"libxml/xmlversion.h",
|
"libxml/xmlversion.h",
|
||||||
);
|
);
|
||||||
lib.installHeadersDirectory(
|
lib.installHeadersDirectory(
|
||||||
|
@ -7,7 +7,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
|
||||||
const module = b.addModule("macos", .{
|
const module = b.addModule("macos", .{
|
||||||
.root_source_file = .{ .path = "main.zig" },
|
.root_source_file = b.path("main.zig"),
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
@ -21,11 +21,11 @@ pub fn build(b: *std.Build) !void {
|
|||||||
var flags = std.ArrayList([]const u8).init(b.allocator);
|
var flags = std.ArrayList([]const u8).init(b.allocator);
|
||||||
defer flags.deinit();
|
defer flags.deinit();
|
||||||
lib.addCSourceFile(.{
|
lib.addCSourceFile(.{
|
||||||
.file = .{ .path = "os/log.c" },
|
.file = b.path("os/log.c"),
|
||||||
.flags = flags.items,
|
.flags = flags.items,
|
||||||
});
|
});
|
||||||
lib.addCSourceFile(.{
|
lib.addCSourceFile(.{
|
||||||
.file = .{ .path = "text/ext.c" },
|
.file = b.path("text/ext.c"),
|
||||||
.flags = flags.items,
|
.flags = flags.items,
|
||||||
});
|
});
|
||||||
lib.linkFramework("CoreFoundation");
|
lib.linkFramework("CoreFoundation");
|
||||||
@ -55,7 +55,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
{
|
{
|
||||||
const test_exe = b.addTest(.{
|
const test_exe = b.addTest(.{
|
||||||
.name = "test",
|
.name = "test",
|
||||||
.root_source_file = .{ .path = "main.zig" },
|
.root_source_file = b.path("main.zig"),
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
|
@ -5,7 +5,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
const target = b.standardTargetOptions(.{});
|
const target = b.standardTargetOptions(.{});
|
||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
|
||||||
const module = b.addModule("oniguruma", .{ .root_source_file = .{ .path = "main.zig" } });
|
const module = b.addModule("oniguruma", .{ .root_source_file = b.path("main.zig") });
|
||||||
|
|
||||||
const upstream = b.dependency("oniguruma", .{});
|
const upstream = b.dependency("oniguruma", .{});
|
||||||
const lib = try buildOniguruma(b, upstream, target, optimize);
|
const lib = try buildOniguruma(b, upstream, target, optimize);
|
||||||
@ -15,7 +15,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
if (target.query.isNative()) {
|
if (target.query.isNative()) {
|
||||||
const test_exe = b.addTest(.{
|
const test_exe = b.addTest(.{
|
||||||
.name = "test",
|
.name = "test",
|
||||||
.root_source_file = .{ .path = "main.zig" },
|
.root_source_file = b.path("main.zig"),
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
|
|
||||||
pub fn build(b: *std.Build) !void {
|
pub fn build(b: *std.Build) !void {
|
||||||
const module = b.addModule("opengl", .{ .root_source_file = .{ .path = "main.zig" } });
|
const module = b.addModule("opengl", .{ .root_source_file = b.path("main.zig") });
|
||||||
module.addIncludePath(.{ .path = "../../vendor/glad/include" });
|
module.addIncludePath(b.path("../../vendor/glad/include"));
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
const target = b.standardTargetOptions(.{});
|
const target = b.standardTargetOptions(.{});
|
||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
|
||||||
const module = b.addModule("pixman", .{ .root_source_file = .{ .path = "main.zig" } });
|
const module = b.addModule("pixman", .{ .root_source_file = b.path("main.zig") });
|
||||||
|
|
||||||
const upstream = b.dependency("pixman", .{});
|
const upstream = b.dependency("pixman", .{});
|
||||||
const lib = b.addStaticLibrary(.{
|
const lib = b.addStaticLibrary(.{
|
||||||
@ -22,9 +22,9 @@ pub fn build(b: *std.Build) !void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
lib.addIncludePath(upstream.path(""));
|
lib.addIncludePath(upstream.path(""));
|
||||||
lib.addIncludePath(.{ .path = "" });
|
lib.addIncludePath(b.path(""));
|
||||||
module.addIncludePath(upstream.path("pixman"));
|
module.addIncludePath(upstream.path("pixman"));
|
||||||
module.addIncludePath(.{ .path = "" });
|
module.addIncludePath(b.path(""));
|
||||||
|
|
||||||
var flags = std.ArrayList([]const u8).init(b.allocator);
|
var flags = std.ArrayList([]const u8).init(b.allocator);
|
||||||
defer flags.deinit();
|
defer flags.deinit();
|
||||||
@ -62,7 +62,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
.flags = flags.items,
|
.flags = flags.items,
|
||||||
});
|
});
|
||||||
|
|
||||||
lib.installHeader(.{ .path = "pixman-version.h" }, "pixman-version.h");
|
lib.installHeader(b.path("pixman-version.h"), "pixman-version.h");
|
||||||
lib.installHeadersDirectory(
|
lib.installHeadersDirectory(
|
||||||
upstream.path("pixman"),
|
upstream.path("pixman"),
|
||||||
"",
|
"",
|
||||||
@ -74,7 +74,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
if (target.query.isNative()) {
|
if (target.query.isNative()) {
|
||||||
const test_exe = b.addTest(.{
|
const test_exe = b.addTest(.{
|
||||||
.name = "test",
|
.name = "test",
|
||||||
.root_source_file = .{ .path = "main.zig" },
|
.root_source_file = b.path("main.zig"),
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
|
@ -10,7 +10,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
lib.linkLibCpp();
|
lib.linkLibCpp();
|
||||||
lib.addIncludePath(.{ .path = "vendor" });
|
lib.addIncludePath(b.path("vendor"));
|
||||||
|
|
||||||
if (target.result.isDarwin()) {
|
if (target.result.isDarwin()) {
|
||||||
const apple_sdk = @import("apple_sdk");
|
const apple_sdk = @import("apple_sdk");
|
||||||
@ -28,7 +28,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
lib.installHeadersDirectory(
|
lib.installHeadersDirectory(
|
||||||
.{ .path = "vendor" },
|
b.path("vendor"),
|
||||||
"",
|
"",
|
||||||
.{ .include_extensions = &.{".h"} },
|
.{ .include_extensions = &.{".h"} },
|
||||||
);
|
);
|
||||||
|
@ -6,7 +6,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
|
|
||||||
const upstream = b.dependency("spirv_cross", .{});
|
const upstream = b.dependency("spirv_cross", .{});
|
||||||
|
|
||||||
const module = b.addModule("spirv_cross", .{ .root_source_file = .{ .path = "main.zig" } });
|
const module = b.addModule("spirv_cross", .{ .root_source_file = b.path("main.zig") });
|
||||||
module.addIncludePath(upstream.path(""));
|
module.addIncludePath(upstream.path(""));
|
||||||
|
|
||||||
const lib = try buildSpirvCross(b, upstream, target, optimize);
|
const lib = try buildSpirvCross(b, upstream, target, optimize);
|
||||||
@ -15,7 +15,7 @@ pub fn build(b: *std.Build) !void {
|
|||||||
if (target.query.isNative()) {
|
if (target.query.isNative()) {
|
||||||
const test_exe = b.addTest(.{
|
const test_exe = b.addTest(.{
|
||||||
.name = "test",
|
.name = "test",
|
||||||
.root_source_file = .{ .path = "main.zig" },
|
.root_source_file = b.path("main.zig"),
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user