Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbcce7b1

Browse files
committed
update zsdl
1 parentfd1a8af commitbcce7b1

File tree

5 files changed

+81
-23
lines changed

5 files changed

+81
-23
lines changed

‎build.zig.zon‎

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -128,23 +128,8 @@
128128
},
129129

130130
.zsdl= .{
131-
.url="https://github.com/zig-gamedev/zsdl/archive/89c1fe2d7ef5020c68e71ac574195f09fc949cce.tar.gz",
132-
.hash="zsdl-0.4.0-dev-rFpjE5FXWQAHcbsSHDjFtbTkruSgvRVYOae6x8RXCnoM",
133-
},
134-
.sdl2_prebuilt_macos= .{
135-
.url="https://github.com/zig-gamedev/sdl2-prebuilt-macos/archive/7bc0fa9101342c019eed252d43f490660dfa411b.tar.gz",
136-
.hash="sdl2_prebuilt_macos-0.2.0-dev-DaOxP5Eq2QBpNBkpXn2qjyI6_s0gINcbdUMpqI1KshaH",
137-
.lazy=true,
138-
},
139-
.sdl2_prebuilt_x86_64_windows_gnu= .{
140-
.url="https://github.com/zig-gamedev/sdl2-prebuilt-x86_64-windows-gnu/archive/8de1512cedfa1fb3ab17ecf295af8cabd7f231f1.tar.gz",
141-
.hash="sdl2_prebuilt_x86_64_windows_gnu-0.2.0-dev-HPeIhv2VaQBOWF4Fjtr7Vb9bA852pUtwUuQKdvNvkA98",
142-
.lazy=true,
143-
},
144-
.sdl2_prebuilt_x86_64_linux_gnu= .{
145-
.url="https://github.com/zig-gamedev/sdl2-prebuilt-x86_64-linux-gnu/archive/ce2b511c052c3fdc35c286ade8235d2830a50992.tar.gz",
146-
.hash="sdl2_prebuilt_x86_64_linux_gnu-0.2.0-dev-NHZ_xrzSHwDJDoAxuVi000OEq428znS1fDRRJE8PlXHu",
147-
.lazy=true,
131+
.url="https://github.com/zig-gamedev/zsdl/archive/a764b0ee51a157a6133007e4f423a869df9e31d7.tar.gz",
132+
.hash="zsdl-0.4.0-dev-rFpjE2BgWQADibKkkIjv0Ig8k96MOu3Yeo6e0n9OD85L",
148133
},
149134
.sdl3_prebuilt_macos= .{
150135
.url="https://github.com/zig-gamedev/sdl3-prebuilt-macos/archive/e89207914a0f0163c0fb543da4f530f645ef5969.tar.gz",
@@ -161,6 +146,21 @@
161146
.hash="sdl3_prebuilt_x86_64_linux_gnu-0.2.0-dev-qpwWsmyVNwBHzXjgC9Z-U02SXoUVMMxvCnI7XKocDcDn",
162147
.lazy=true,
163148
},
149+
.sdl2_prebuilt_macos= .{
150+
.url="https://github.com/zig-gamedev/sdl2-prebuilt-macos/archive/7bc0fa9101342c019eed252d43f490660dfa411b.tar.gz",
151+
.hash="sdl2_prebuilt_macos-0.2.0-dev-DaOxP5Eq2QBpNBkpXn2qjyI6_s0gINcbdUMpqI1KshaH",
152+
.lazy=true,
153+
},
154+
.sdl2_prebuilt_x86_64_windows_gnu= .{
155+
.url="https://github.com/zig-gamedev/sdl2-prebuilt-x86_64-windows-gnu/archive/8de1512cedfa1fb3ab17ecf295af8cabd7f231f1.tar.gz",
156+
.hash="sdl2_prebuilt_x86_64_windows_gnu-0.2.0-dev-HPeIhv2VaQBOWF4Fjtr7Vb9bA852pUtwUuQKdvNvkA98",
157+
.lazy=true,
158+
},
159+
.sdl2_prebuilt_x86_64_linux_gnu= .{
160+
.url="https://github.com/zig-gamedev/sdl2-prebuilt-x86_64-linux-gnu/archive/ce2b511c052c3fdc35c286ade8235d2830a50992.tar.gz",
161+
.hash="sdl2_prebuilt_x86_64_linux_gnu-0.2.0-dev-NHZ_xrzSHwDJDoAxuVi000OEq428znS1fDRRJE8PlXHu",
162+
.lazy=true,
163+
},
164164

165165
.zstbi= .{
166166
.url="https://github.com/zig-gamedev/zstbi/archive/094c4bba5cdbec167d3f6aaa98cccccd5c99145f.tar.gz",

‎experiments/genart/build.zig‎

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,28 @@ fn install(
7575

7676
exe.root_module.addImport("zsdl2",zsdl2_module);
7777

78-
@import("zsdl").link_SDL2(exe);
7978
@import("zsdl").prebuilt_sdl2.addLibraryPathsTo(exe);
79+
switch (exe.rootModuleTarget().os.tag) {
80+
.windows=> {
81+
exe.linkSystemLibrary("SDL2");
82+
exe.linkSystemLibrary("SDL2main");
83+
exe.linkSystemLibrary("SDL2_ttf");
84+
exe.linkSystemLibrary("SDL2_image");
85+
},
86+
.linux=> {
87+
exe.linkSystemLibrary("SDL2");
88+
exe.linkSystemLibrary("SDL2_ttf");
89+
exe.linkSystemLibrary("SDL2_image");
90+
exe.root_module.addRPathSpecial("$ORIGIN");
91+
},
92+
.macos=> {
93+
exe.linkFramework("SDL2");
94+
exe.linkFramework("SDL2_ttf");
95+
exe.linkFramework("SDL2_image");
96+
exe.root_module.addRPathSpecial("@executable_path");
97+
},
98+
else=> {},
99+
}
80100

81101
exe.root_module.addImport("zopengl",zopengl_module);
82102

‎samples/minimal_sdl_gl/build.zig‎

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,27 @@ pub fn build(b: *std.Build, options: anytype) *std.Build.Step.Compile {
1717
exe.root_module.addImport("zsdl2",zsdl.module("zsdl2"));
1818

1919
@import("zsdl").prebuilt_sdl2.addLibraryPathsTo(exe);
20-
@import("zsdl").link_SDL2(exe);
20+
switch (exe.rootModuleTarget().os.tag) {
21+
.windows=> {
22+
exe.linkSystemLibrary("SDL2");
23+
exe.linkSystemLibrary("SDL2main");
24+
exe.linkSystemLibrary("SDL2_ttf");
25+
exe.linkSystemLibrary("SDL2_image");
26+
},
27+
.linux=> {
28+
exe.linkSystemLibrary("SDL2");
29+
exe.linkSystemLibrary("SDL2_ttf");
30+
exe.linkSystemLibrary("SDL2_image");
31+
exe.root_module.addRPathSpecial("$ORIGIN");
32+
},
33+
.macos=> {
34+
exe.linkFramework("SDL2");
35+
exe.linkFramework("SDL2_ttf");
36+
exe.linkFramework("SDL2_image");
37+
exe.root_module.addRPathSpecial("@executable_path");
38+
},
39+
else=> {},
40+
}
2141

2242
constzopengl=b.dependency("zopengl", .{});
2343
exe.root_module.addImport("zopengl",zopengl.module("root"));

‎samples/sdl2_demo/build.zig‎

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,27 @@ pub fn build(b: *std.Build, options: anytype) *std.Build.Step.Compile {
2424
exe.root_module.addImport("zsdl2_image",zsdl.module("zsdl2_image"));
2525

2626
@import("zsdl").prebuilt_sdl2.addLibraryPathsTo(exe);
27-
28-
@import("zsdl").link_SDL2(exe);
29-
@import("zsdl").link_SDL2_image(exe);
27+
switch (exe.rootModuleTarget().os.tag) {
28+
.windows=> {
29+
exe.linkSystemLibrary("SDL2");
30+
exe.linkSystemLibrary("SDL2main");
31+
exe.linkSystemLibrary("SDL2_ttf");
32+
exe.linkSystemLibrary("SDL2_image");
33+
},
34+
.linux=> {
35+
exe.linkSystemLibrary("SDL2");
36+
exe.linkSystemLibrary("SDL2_ttf");
37+
exe.linkSystemLibrary("SDL2_image");
38+
exe.root_module.addRPathSpecial("$ORIGIN");
39+
},
40+
.macos=> {
41+
exe.linkFramework("SDL2");
42+
exe.linkFramework("SDL2_ttf");
43+
exe.linkFramework("SDL2_image");
44+
exe.root_module.addRPathSpecial("@executable_path");
45+
},
46+
else=> {},
47+
}
3048

3149
constinstall_content_step=b.addInstallDirectory(.{
3250
.source_dir=b.path(b.pathJoin(&.{cwd_path,content_dir })),

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp