Skip to content

Commit

Permalink
zig-build: updated to latest v0.12.0-master
Browse files Browse the repository at this point in the history
  • Loading branch information
kassane committed Apr 17, 2024
1 parent e1c9dd1 commit 46d6f8b
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub fn build(b: *std.Build) void {
"-Wextra",
},
});
lib.addIncludePath(Path.relative("include"));
lib.addIncludePath(b.path("include"));
if (optimize == .Debug or optimize == .ReleaseSafe)
lib.bundle_compiler_rt = true
else
Expand All @@ -44,11 +44,7 @@ pub fn build(b: *std.Build) void {
lib.linkLibCpp() // static-linking LLVM-libcxx (all platforms)
else
lib.linkLibC();
lib.installHeadersDirectoryOptions(.{
.source_dir = Path.relative("include"),
.install_dir = .header,
.install_subdir = "",
});
lib.installHeadersDirectory(b.path("include"), "", .{});
b.installArtifact(lib);

if (tests) {
Expand Down Expand Up @@ -176,11 +172,11 @@ fn buildTest(b: *std.Build, info: BuildInfo) void {
.optimize = info.optimize,
.target = info.target,
});
test_exe.addIncludePath(Path.relative("include"));
test_exe.addIncludePath(Path.relative("test"));
test_exe.addIncludePath(Path.relative("test/gtest"));
test_exe.addIncludePath(b.path("include"));
test_exe.addIncludePath(b.path("test"));
test_exe.addIncludePath(b.path("test/gtest"));
test_exe.addCSourceFile(.{
.file = Path.relative(info.path),
.file = b.path(info.path),
.flags = &.{},
});
test_exe.addCSourceFiles(.{
Expand Down

0 comments on commit 46d6f8b

Please sign in to comment.