File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 11const std = @import ("std" );
22
33pub fn build (b : * std.Build ) void {
4- const zwindows = b .dependency ("zwindows" , .{
4+ const zopenvr = b .addModule ("root" , .{
5+ .root_source_file = b .path ("src/openvr.zig" ),
6+ });
7+
8+ if (b .lazyDependency ("zwindows" , .{
59 .zxaudio2_debug_layer = b .option (
610 bool ,
711 "zxaudio2_debug_layer" ,
@@ -17,13 +21,9 @@ pub fn build(b: *std.Build) void {
1721 "zd3d12_gbv" ,
1822 "Enable DirectX 12 GPU-Based Validation (GBV)" ,
1923 ) orelse false ,
20- });
21- _ = b .addModule ("root" , .{
22- .root_source_file = b .path ("src/openvr.zig" ),
23- .imports = &.{
24- .{ .name = "zwindows" , .module = zwindows .module ("zwindows" ) },
25- },
26- });
24+ })) | zwindows | {
25+ zopenvr .addImport ("zwindows" , zwindows .module ("zwindows" ));
26+ }
2727}
2828
2929pub fn addLibraryPathsTo (zopenvr : * std.Build.Dependency , compile_step : * std.Build.Step.Compile ) void {
Original file line number Diff line number Diff line change 1515 .zwindows = .{
1616 .url = "git+https://github.com/zig-gamedev/zwindows#6c2200ed1f5e02d6b27d803d53e3743a2d1ea0b2" ,
1717 .hash = "zwindows-0.2.0-dev-xMZ1u6VcDACVsrJqnbgqNJQe3Tk8Lo0zpQ0ngKNwDj0a" ,
18+ .lazy = true ,
1819 },
1920 },
2021}
You can’t perform that action at this time.
0 commit comments