Skip to content

Commit

Permalink
replace direct3d-headers (deprecated) with directx-headers
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Gutekanst <[email protected]>
  • Loading branch information
emidoots committed Dec 31, 2024
1 parent dd5adbb commit 2aace3f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
8 changes: 3 additions & 5 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -285,17 +285,15 @@ fn linkSysgpu(b: *std.Build, module: *std.Build.Module) void {
}
} else if (target.result.os.tag == .windows) {
// TODO(build): Windows should never link OpenGL except in debug builds.
module.linkSystemLibrary("dxgi", .{});
module.linkSystemLibrary("d3d12", .{});
module.linkSystemLibrary("d3dcompiler_47", .{});
module.linkSystemLibrary("opengl32", .{});

if (b.lazyDependency("direct3d_headers", .{
if (b.lazyDependency("directx_headers", .{
.target = target,
.optimize = optimize,
})) |dep| {
module.linkLibrary(dep.artifact("direct3d-headers"));
@import("direct3d_headers").addLibraryPathToModule(module);
}
})) |dep| module.linkLibrary(dep.artifact("directx-headers"));
if (b.lazyDependency("opengl_headers", .{
.target = target,
.optimize = optimize,
Expand Down
9 changes: 4 additions & 5 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@
.hash = "122098b9174895f9708bc824b0f9e550c401892c40a900006459acf2cbf78acd99bb",
.lazy = true,
},
.direct3d_headers = .{
.url = "https://pkg.machengine.org/direct3d-headers/e85bc63ad7ed57b465014ff8b8abb2942f7f8a4c.tar.gz",
.hash = "122054d8c8aa67bb5fb86f74f5ce24d67238a65bc8ea537eb0e0368589fc3127331f",
// TODO(build): be able to mark this dependency as lazy
// .lazy = true,
.directx_headers = .{
.url = "https://pkg.machengine.org/directx-headers/eae9b3b8a84a32ae9e67025fd64e8d8b7755e628.tar.gz",
.hash = "1220334a0e3480fef60443cef8b519d08b4dbf16ba37d98a7b77647fa4b7761b6048",
.lazy = true,
},
.opengl_headers = .{
.url = "https://pkg.machengine.org/opengl-headers/d0b37fdc3b039ba5b430110545f398f0278c5396.tar.gz",
Expand Down

0 comments on commit 2aace3f

Please sign in to comment.