File tree 2 files changed +9
-8
lines changed
2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 1
1
const std = @import ("std" );
2
2
3
3
pub 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" , .{
5
9
.zxaudio2_debug_layer = b .option (
6
10
bool ,
7
11
"zxaudio2_debug_layer" ,
@@ -17,13 +21,9 @@ pub fn build(b: *std.Build) void {
17
21
"zd3d12_gbv" ,
18
22
"Enable DirectX 12 GPU-Based Validation (GBV)" ,
19
23
) 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
+ }
27
27
}
28
28
29
29
pub fn addLibraryPathsTo (zopenvr : * std.Build.Dependency , compile_step : * std.Build.Step.Compile ) void {
Original file line number Diff line number Diff line change 15
15
.zwindows = .{
16
16
.url = "git+https://github.com/zig-gamedev/zwindows#6c2200ed1f5e02d6b27d803d53e3743a2d1ea0b2" ,
17
17
.hash = "zwindows-0.2.0-dev-xMZ1u6VcDACVsrJqnbgqNJQe3Tk8Lo0zpQ0ngKNwDj0a" ,
18
+ .lazy = true ,
18
19
},
19
20
},
20
21
}
You can’t perform that action at this time.
0 commit comments