Skip to content

Commit

Permalink
build.zig: add support for freebsd
Browse files Browse the repository at this point in the history
  • Loading branch information
thechampagne authored Jun 12, 2024
1 parent 40a3bc8 commit 1fb7832
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ pub fn build(b: *std.Build) void {
staticLib.addCSourceFile(.{ .file = .{ .path = "external/webview/webview.cc"}, .flags = &.{"-std=c++11"}});
staticLib.linkFramework("WebKit");
},
.freebsd => {
staticLib.addCSourceFile(.{ .file = .{ .path = "external/webview/webview.cc"}, .flags = &.{"-std=c++11"}});
staticLib.linkSystemLibrary("gtk3");
staticLib.linkSystemLibrary("webkit2-gtk3");
},
else => {
staticLib.addCSourceFile(.{ .file = .{ .path = "external/webview/webview.cc"}, .flags = &.{"-std=c++11"}});
staticLib.linkSystemLibrary("gtk+-3.0");
Expand Down Expand Up @@ -90,6 +95,11 @@ pub fn build(b: *std.Build) void {
sharedLib.addCSourceFile(.{ .file = .{ .path = "external/webview/webview.cc"}, .flags = &.{"-std=c++11"}});
sharedLib.linkFramework("WebKit");
},
.freebsd => {
staticLib.addCSourceFile(.{ .file = .{ .path = "external/webview/webview.cc"}, .flags = &.{"-std=c++11"}});
staticLib.linkSystemLibrary("gtk3");
staticLib.linkSystemLibrary("webkit2-gtk3");
},
else => {
sharedLib.addCSourceFile(.{ .file = .{ .path = "external/webview/webview.cc"}, .flags = &.{"-std=c++11"}});
sharedLib.linkSystemLibrary("gtk+-3.0");
Expand Down

0 comments on commit 1fb7832

Please sign in to comment.