@@ -6,9 +6,7 @@ pub fn build(b: *std.Build) !void {
6
6
7
7
// Module
8
8
_ = b .addModule ("Qt" , .{
9
- .root_source_file = .{
10
- .path = "src/Qt.zig" ,
11
- },
9
+ .root_source_file = b .path ("src/Qt.zig" ),
12
10
});
13
11
14
12
// Note: If it is not necessary to compile DOtherSide library, please comment on this line.
@@ -68,7 +66,7 @@ pub fn build(b: *std.Build) !void {
68
66
fn makeExample (b : * std.Build , src : BuildInfo ) ! void {
69
67
const example = b .addExecutable (.{
70
68
.name = src .filename (),
71
- .root_source_file = .{ . path = src .path } ,
69
+ .root_source_file = b . path ( src .path ) ,
72
70
.optimize = src .optimize ,
73
71
.target = src .target ,
74
72
});
@@ -79,7 +77,7 @@ fn makeExample(b: *std.Build, src: BuildInfo) !void {
79
77
}
80
78
81
79
example .root_module .addImport ("Qt" , b .modules .get ("Qt" ).? );
82
- example .addLibraryPath (.{ . path = " zig-cache/lib" } );
80
+ example .addLibraryPath (b . path ( ". zig-cache/lib") );
83
81
84
82
if (example .rootModuleTarget ().os .tag == .windows ) {
85
83
example .want_lto = false ;
@@ -107,15 +105,15 @@ pub fn cmakeBuild(b: *std.Build) *std.Build.Step.Run {
107
105
const DOtherSide_configure = b .addSystemCommand (&[_ ][]const u8 {
108
106
"cmake" ,
109
107
"-B" ,
110
- "zig-cache" ,
108
+ ". zig-cache" ,
111
109
"-S" ,
112
110
dotherside ,
113
111
"-DCMAKE_BUILD_TYPE=RelMinSize" ,
114
112
});
115
113
const DOtherSide_build = b .addSystemCommand (&[_ ][]const u8 {
116
114
"cmake" ,
117
115
"--build" ,
118
- "zig-cache" ,
116
+ ". zig-cache" ,
119
117
"--parallel" ,
120
118
});
121
119
0 commit comments