Build System Tricks

Answering my own question here :sweat_smile:. If I had just spent 10 more minutes I would have come across the answer.

Answer: You can pass build options from your build.zig to a dependency via the args parameter. Make sure they actually match.

build.zig

const lib_godot = b.dependency("godot", .{
    .godot_path = godot_path,
});

Dependency build.zig

const godot_path = b.option([]const u8, "godot_path", "Path to Godot binary [default: `godot`]") orelse "godot";

2 Likes