Skip to content

Commit 238264c

Browse files
committed
fix dxc paths
1 parent 84b0706 commit 238264c

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

build.zig

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,9 @@ pub const CompileShaders = struct {
163163
) void {
164164
const b = self.step.owner;
165165

166-
const zwin32_path = comptime std.fs.path.dirname(@src().file) orelse ".";
167166
const dxc_path = switch (builtin.target.os.tag) {
168-
.windows => zwin32_path ++ "/bin/x64/dxc.exe",
169-
.linux => zwin32_path ++ "/bin/x64/dxc",
167+
.windows => b.path("bin/x64/dxc.exe").getPath(b),
168+
.linux => b.path("bin/x64/dxc").getPath(b),
170169
else => @panic("Unsupported target"),
171170
};
172171

@@ -184,10 +183,7 @@ pub const CompileShaders = struct {
184183

185184
const cmd_step = b.addSystemCommand(&dxc_command);
186185
if (builtin.target.os.tag == .linux) {
187-
cmd_step.setEnvironmentVariable(
188-
"LD_LIBRARY_PATH",
189-
zwin32_path ++ "/bin/x64",
190-
);
186+
cmd_step.setEnvironmentVariable("LD_LIBRARY_PATH", b.path("bin/x64").getPath(b));
191187
}
192188
self.step.dependOn(&cmd_step.step);
193189
}

0 commit comments

Comments
 (0)