File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -163,10 +163,9 @@ pub const CompileShaders = struct {
163
163
) void {
164
164
const b = self .step .owner ;
165
165
166
- const zwin32_path = comptime std .fs .path .dirname (@src ().file ) orelse "." ;
167
166
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 ) ,
170
169
else = > @panic ("Unsupported target" ),
171
170
};
172
171
@@ -184,10 +183,7 @@ pub const CompileShaders = struct {
184
183
185
184
const cmd_step = b .addSystemCommand (& dxc_command );
186
185
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 ));
191
187
}
192
188
self .step .dependOn (& cmd_step .step );
193
189
}
You can’t perform that action at this time.
0 commit comments