From a983a0a59b348a885f24656a8646707554170574 Mon Sep 17 00:00:00 2001 From: Greg V Date: Wed, 17 Oct 2018 22:18:50 +0300 Subject: Add /usr/local/lib path for libxml2 and link libc++ on FreeBSD --- build.zig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'build.zig') diff --git a/build.zig b/build.zig index c2a20015a7..fc460df129 100644 --- a/build.zig +++ b/build.zig @@ -284,7 +284,7 @@ fn configureStage2(b: *Builder, exe: var, ctx: Context) !void { exe.addObjectFile(libstdcxx_path); exe.linkSystemLibrary("pthread"); - } else if (exe.target.isDarwin()) { + } else if (exe.target.isDarwin() or exe.target.isFreeBSD()) { exe.linkSystemLibrary("c++"); } @@ -293,6 +293,10 @@ fn configureStage2(b: *Builder, exe: var, ctx: Context) !void { } if (exe.target.getOs() != builtin.Os.windows) { + if (exe.target.isFreeBSD()) { + exe.addLibPath("/usr/local/lib"); + // TODO use pkg-config + } exe.linkSystemLibrary("xml2"); } exe.linkSystemLibrary("c"); -- cgit v1.2.3