File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -14,13 +14,13 @@ pub fn build(b: *std.Build) void {
1414 .target = target ,
1515 .optimize = optimize ,
1616 });
17-
1817 lib .bundle_compiler_rt = true ;
1918 lib .addIncludePath (b .path ("src" ));
2019 lib .linkLibC ();
21-
20+ lib . installHeader ( b . path ( "src/ini.h" ), "ini.h" );
2221 b .installArtifact (lib );
2322
23+ const example_step = b .step ("example" , "Build examples" );
2424 const example_c = b .addExecutable (.{
2525 .name = "example-c" ,
2626 .optimize = optimize ,
@@ -37,8 +37,7 @@ pub fn build(b: *std.Build) void {
3737 example_c .addIncludePath (b .path ("src" ));
3838 example_c .linkLibrary (lib );
3939 example_c .linkLibC ();
40-
41- b .installArtifact (example_c );
40+ example_step .dependOn (& b .addInstallArtifact (example_c , .{}).step );
4241
4342 const example_zig = b .addExecutable (.{
4443 .name = "example-zig" ,
@@ -47,8 +46,7 @@ pub fn build(b: *std.Build) void {
4746 .target = target ,
4847 });
4948 example_zig .root_module .addImport ("ini" , b .modules .get ("ini" ).? );
50-
51- b .installArtifact (example_zig );
49+ example_step .dependOn (& b .addInstallArtifact (example_zig , .{}).step );
5250
5351 const test_step = b .step ("test" , "Run library tests" );
5452 const main_tests = b .addTest (.{
You can’t perform that action at this time.
0 commit comments