@@ -130,7 +130,7 @@ pub fn setupSdlImage(b: *std.Build, sdl3: *std.Build.Module, translate_c: *std.B
130130 .link_libc = true ,
131131 }),
132132 });
133- lib .linkLibrary (sdl_dep_lib );
133+ lib .root_module . linkLibrary (sdl_dep_lib );
134134
135135 // Use stb_image for loading JPEG and PNG files. Native alternatives such as
136136 // Windows Imaging Component and Apple's Image I/O framework are not yet
@@ -168,10 +168,10 @@ pub fn setupSdlImage(b: *std.Build, sdl3: *std.Build.Module, translate_c: *std.B
168168 lib .root_module .addCMacro ("LOAD_XV" , "" );
169169
170170 translate_c .addIncludePath (upstream .path ("include" ));
171- lib .addIncludePath (upstream .path ("include" ));
172- lib .addIncludePath (upstream .path ("src" ));
171+ lib .root_module . addIncludePath (upstream .path ("include" ));
172+ lib .root_module . addIncludePath (upstream .path ("src" ));
173173
174- lib .addCSourceFiles (.{
174+ lib .root_module . addCSourceFiles (.{
175175 .root = upstream .path ("src" ),
176176 .files = &.{
177177 "IMG.c" ,
@@ -198,11 +198,11 @@ pub fn setupSdlImage(b: *std.Build, sdl3: *std.Build.Module, translate_c: *std.B
198198 });
199199
200200 if (target .result .os .tag == .macos ) {
201- lib .addCSourceFile (.{
201+ lib .root_module . addCSourceFile (.{
202202 .file = upstream .path ("src/IMG_ImageIO.m" ),
203203 });
204- lib .linkFramework ("Foundation" );
205- lib .linkFramework ("ApplicationServices" );
204+ lib .root_module . linkFramework ("Foundation" , .{} );
205+ lib .root_module . linkFramework ("ApplicationServices" , .{} );
206206 }
207207
208208 lib .installHeadersDirectory (upstream .path ("include" ), "" , .{});
@@ -288,7 +288,7 @@ pub fn setupTest(b: *std.Build, cfg: Config, extension_options: *std.Build.Step.
288288 .optimize = cfg .optimize ,
289289 });
290290 const sdl_dep_lib = sdl_dep .artifact ("SDL3" );
291- tst .linkLibrary (sdl_dep_lib );
291+ tst .root_module . linkLibrary (sdl_dep_lib );
292292 const tst_run = b .addRunArtifact (tst );
293293 const tst_step = b .step ("test" , "Run all tests" );
294294 tst_step .dependOn (& tst_run .step );
0 commit comments