@@ -152,9 +152,11 @@ pub fn link_SDL3(compile_step: *std.Build.Step.Compile) void {
152
152
pub fn testVersionCheckSDL2 (b : * std.Build , target : std.Build.ResolvedTarget ) * std.Build.Step {
153
153
const test_sdl2_version_check = b .addTest (.{
154
154
.name = "sdl2-version-check" ,
155
- .root_source_file = b .dependency ("zsdl" , .{}).path ("src/sdl2_version_check.zig" ),
156
- .target = target ,
157
- .optimize = .ReleaseSafe ,
155
+ .root_module = b .createModule (.{
156
+ .root_source_file = b .dependency ("zsdl" , .{}).path ("src/sdl2_version_check.zig" ),
157
+ .target = target ,
158
+ .optimize = .ReleaseSafe ,
159
+ }),
158
160
});
159
161
160
162
link_SDL2 (test_sdl2_version_check );
@@ -342,7 +344,7 @@ pub const prebuilt_sdl3 = struct {
342
344
return & b .addInstallFileWithDir (
343
345
sdl3_prebuilt .path ("bin/SDL3.dll" ),
344
346
install_dir ,
345
- "SDL2 .dll" ,
347
+ "SDL3 .dll" ,
346
348
).step ;
347
349
}
348
350
}
@@ -353,7 +355,7 @@ pub const prebuilt_sdl3 = struct {
353
355
return & b .addInstallFileWithDir (
354
356
sdl3_prebuilt .path ("lib/libSDL3.so" ),
355
357
install_dir ,
356
- "libSDL2 .so" ,
358
+ "libSDL3 .so" ,
357
359
).step ;
358
360
}
359
361
}
@@ -383,12 +385,22 @@ fn addTests(
383
385
const b = test_step .owner ;
384
386
const tests = b .addTest (.{
385
387
.name = name ,
386
- .root_source_file = b .path (root_src_path ),
387
- .target = target ,
388
- .optimize = optimize ,
388
+ .root_module = b .createModule (.{
389
+ .root_source_file = b .path (root_src_path ),
390
+ .target = target ,
391
+ .optimize = optimize ,
392
+ }),
389
393
});
390
394
b .installArtifact (tests );
391
- test_step .dependOn (& b .addRunArtifact (tests ).step );
395
+
396
+ const run = b .addRunArtifact (tests );
397
+ if (target .result .os .tag == .windows ) {
398
+ run .setCwd (.{
399
+ .cwd_relative = b .getInstallPath (.bin , "" ),
400
+ });
401
+ }
402
+
403
+ test_step .dependOn (& run .step );
392
404
return tests ;
393
405
}
394
406
0 commit comments