iterating on the new for loop syntax

This commit is contained in:
Mitchell Hashimoto
2023-02-27 21:53:09 -08:00
parent 8db30107ae
commit 2b73fbaa0d
3 changed files with 17 additions and 9 deletions

View File

@@ -1,6 +1,4 @@
const std = @import("std");
const freetypepkg = @import("../freetype/build.zig");
const macospkg = @import("../macos/build.zig");
/// Directories with our includes.
const root = thisDir() ++ "../../../vendor/harfbuzz/";
@@ -8,12 +6,15 @@ const include_path = root ++ "src/";
pub const include_paths = .{include_path};
pub fn module(b: *std.Build) *std.build.Module {
pub fn module(b: *std.Build, deps: struct {
freetype: *std.build.Module,
macos: *std.build.Module,
}) *std.build.Module {
return b.createModule(.{
.source_file = .{ .path = (comptime thisDir()) ++ "/main.zig" },
.dependencies = &.{
.{ .name = "freetype", .module = freetypepkg.module(b) },
.{ .name = "macos", .module = macospkg.module(b) },
.{ .name = "freetype", .module = deps.freetype },
.{ .name = "macos", .module = deps.macos },
},
});
}