@@ -6,7 +6,7 @@ pub fn build(b: *std.Build) !void {
6
6
7
7
// Module
8
8
_ = b .addModule ("Qt" , .{
9
- .source_file = .{
9
+ .root_source_file = .{
10
10
.path = "src/Qt.zig" ,
11
11
},
12
12
});
@@ -75,16 +75,15 @@ fn makeExample(b: *std.Build, src: BuildInfo) !void {
75
75
76
76
//Strip file
77
77
if (src .optimize != .Debug ) {
78
- example .strip = true ;
78
+ example .root_module . strip = true ;
79
79
}
80
80
81
- example .addModule ("Qt" , b .modules .get ("Qt" ).? );
81
+ example .root_module . addImport ("Qt" , b .modules .get ("Qt" ).? );
82
82
example .addLibraryPath (.{ .path = "zig-cache/lib" });
83
83
84
- if (example .target . isWindows ()) {
84
+ if (example .rootModuleTarget (). os . tag == .windows )
85
85
example .want_lto = false ;
86
- example .linkSystemLibraryName ("DOtherSide.dll" );
87
- } else example .linkSystemLibrary ("DOtherSide" );
86
+ example .linkSystemLibrary ("DOtherSide" );
88
87
example .linkLibC ();
89
88
90
89
b .installArtifact (example );
@@ -102,7 +101,8 @@ fn makeExample(b: *std.Build, src: BuildInfo) !void {
102
101
103
102
pub fn cmakeBuild (b : * std.Build ) * std.Build.Step.Run {
104
103
const dotherside = b .dependency ("dotherside" , .{}).path ("" ).getPath (b );
105
- //CMake builds - DOtherSide build
104
+
105
+ // CMake builds - DOtherSide build
106
106
const DOtherSide_configure = b .addSystemCommand (&[_ ][]const u8 {
107
107
"cmake" ,
108
108
"-B" ,
@@ -124,7 +124,7 @@ pub fn cmakeBuild(b: *std.Build) *std.Build.Step.Run {
124
124
125
125
const BuildInfo = struct {
126
126
path : []const u8 ,
127
- target : std.zig.CrossTarget ,
127
+ target : std.Build.ResolvedTarget ,
128
128
optimize : std.builtin.OptimizeMode ,
129
129
130
130
fn filename (self : BuildInfo ) []const u8 {
0 commit comments