Skip to content

Commit f6a7bea

Browse files
committed
Require Zig 0.14.0 and depend on SDL 3.2.8
1 parent 1dbdecc commit f6a7bea

File tree

2 files changed

+20
-15
lines changed

2 files changed

+20
-15
lines changed

build.zig

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,24 @@ pub fn build(b: *std.Build) void {
44
const target = b.standardTargetOptions(.{});
55
const optimize = b.standardOptimizeOption(.{});
66

7-
const upstream = b.dependency("sdl_image", .{});
7+
const upstream = b.dependency("SDL_image", .{});
88

9-
const lib = b.addStaticLibrary(.{
9+
const lib = b.addLibrary(.{
1010
.name = "SDL3_image",
11-
.target = target,
12-
.optimize = optimize,
11+
.version = .{ .major = 3, .minor = 2, .patch = 0 },
12+
.linkage = .static,
13+
.root_module = b.createModule(.{
14+
.target = target,
15+
.optimize = optimize,
16+
.link_libc = true,
17+
}),
1318
});
14-
lib.linkLibC();
1519

16-
const sdl_dep = b.dependency("sdl", .{
20+
const sdl = b.dependency("SDL", .{
1721
.target = target,
1822
.optimize = optimize,
19-
});
20-
const sdl_lib = sdl_dep.artifact("SDL3");
21-
lib.linkLibrary(sdl_lib);
23+
}).artifact("SDL3");
24+
lib.linkLibrary(sdl);
2225

2326
// Use stb_image for loading JPEG and PNG files. Native alternatives such as
2427
// Windows Imaging Component and Apple's Image I/O framework are not yet

build.zig.zon

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
.{
2-
.name = "SDL_image",
2+
.name = .SDL_image,
33
.version = "3.2.0",
4+
.fingerprint = 0x7d6df3671d68a2f9,
5+
.minimum_zig_version = "0.14.0",
46
.dependencies = .{
5-
.sdl = .{
6-
.url = "git+https://github.com/castholm/SDL#v0.1.5+SDL-3.2.4",
7-
.hash = "1220f653f5b656888b522bf5be06fc3062278767cfa7764e5d00eb559056d65b616f",
7+
.SDL = .{
8+
.url = "git+https://github.com/castholm/SDL/#v0.2.0+3.2.8",
9+
.hash = "sdl-0.2.0+3.2.8-7uIn9FxHfQE325TK7b0qpgt10G3x1xl-3ZMOfTzxUg3C",
810
},
9-
.sdl_image = .{
11+
.SDL_image = .{
1012
.url = "git+https://github.com/libsdl-org/SDL_image#release-3.2.0",
11-
.hash = "12207189639c8fef8c532725a9f9c1fee799587df4a382ba2eac2477a4724c0df805",
13+
.hash = "N-V-__8AAOcoIgJxiWOcj--MUyclqfnB_ueZWH30o4K6Lqwk",
1214
},
1315
},
1416
.paths = .{

0 commit comments

Comments
 (0)