Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -698,13 +698,15 @@ pub fn addMbedTls(b: *std.Build, c_lib: *std.Build.Step.Compile, flags: []const

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

c_lib.root_module.addIncludePath(cgltf.path(""));
c_lib.root_module.addIncludePath(stb.path(""));
c_lib.installHeader(cgltf.path("cgltf.h"), "cgltf.h");
c_lib.installHeader(b.path("include/stb/stb_image_write.h"), "stb/stb_image_write.h");
c_lib.installHeader(b.path("include/stb/stb_image.h"), "stb/stb_image.h");
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});
c_lib.root_module.addCSourceFiles(.{.files = &[_][]const u8{"lib/cgltf.c", "lib/stb.c"}, .flags = flags});
}

pub inline fn makeCubyzLibs(b: *std.Build, step: *std.Build.Step, name: []const u8, target: std.Build.ResolvedTarget, optimize: std.builtin.OptimizeMode, flags: []const []const u8, replace_tool: *std.Build.Step.Compile) !*std.Build.Step.Compile {
Expand Down
4 changes: 4 additions & 0 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,9 @@
.url = "https://github.com/Mbed-TLS/TF-PSA-Crypto/archive/refs/tags/tf-psa-crypto-1.0.0.tar.gz",
.hash = "N-V-__8AAOuqOgGAlxfU32chMWurMwBPZACZk-9MdknRMDIM",
},
.stb = .{
.url = "https://github.com/nothings/stb/archive/31c1ad37456438565541f4919958214b6e762fb4.tar.gz",
Comment thread
IntegratedQuantum marked this conversation as resolved.
.hash = "N-V-__8AAN1DTgAKvlSQnjJwSg4ZY2JP5OHmzKOcA4BewA4Y",
},
},
}
7,897 changes: 0 additions & 7,897 deletions include/stb/stb_image.h

This file was deleted.

Loading
Loading