Skip to content

Move stb_image dependencies to build.zig.zon#14

Merged
IntegratedQuantum merged 3 commits into
PixelGuys:masterfrom
AfmanS:master
May 11, 2026
Merged

Move stb_image dependencies to build.zig.zon#14
IntegratedQuantum merged 3 commits into
PixelGuys:masterfrom
AfmanS:master

Conversation

@AfmanS

@AfmanS AfmanS commented May 3, 2026

Copy link
Copy Markdown
Contributor

Also updates stb_image to v2.30.
Progress towards PixelGuys/Cubyz#2346
Tested in windows x86.

Also updates stb_image to v2.30
@Wunka Wunka moved this to Low Priority in PRs to review May 8, 2026
Comment thread build.zig Outdated

pub inline fn addHeaderOnlyLibs(b: *std.Build, c_lib: *std.Build.Step.Compile, flags: []const []const u8) void {
const cgltf = b.dependency("cgltf", .{});
const stbImage = b.dependency("stb_image", .{});

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dependency should be called just stb, since it contains more than just image stuff.

Comment thread build.zig.zon
Comment thread lib/stb_image_write.c Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you merge these into a single stb.c that contains all stb header only libs?

@IntegratedQuantum IntegratedQuantum moved this from Low Priority to High Priority in PRs to review May 11, 2026
@IntegratedQuantum IntegratedQuantum moved this from High Priority to In review in PRs to review May 11, 2026
Comment thread build.zig Outdated
c_lib.installHeader(stb.path("stb_image_write.h"), "stb/stb_image_write.h");
c_lib.installHeader(stb.path("stb_image.h"), "stb/stb_image.h");

c_lib.root_module.addCSourceFiles(.{.files = &[_][]const u8{"lib/cgltf.c", "lib/stb_image.c", "lib/stb_image_write.c"}, .flags = flags});

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new file needs to be added here
Could you also test this in the game, to make sure there aren't more issues like this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, that was a premature push, should be ok now

@AfmanS AfmanS requested a review from IntegratedQuantum May 11, 2026 12:48
@IntegratedQuantum IntegratedQuantum merged commit 754e4da into PixelGuys:master May 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants