Merge pull request #176 from birth-software/restrict-linking

Only link editor libraries if actually using it
This commit is contained in:
David 2024-05-03 18:07:02 -06:00 committed by GitHub
commit 72e42afc86
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -479,7 +479,7 @@ pub fn build(b: *std.Build) !void {
compiler.addIncludePath(.{ .cwd_relative = cxx_include_base });
compiler.addIncludePath(.{ .cwd_relative = try std.mem.concat(b.allocator, u8, &.{ cxx_include_base, "/" ++ @tagName(@import("builtin").cpu.arch) ++ "-redhat-linux" }) });
compiler.addLibraryPath(.{ .cwd_relative = "/usr/lib64/llvm17/lib" });
compiler.addLibraryPath(.{ .cwd_relative = "/usr/lib" });
compiler.addLibraryPath(.{ .cwd_relative = "/usr/lib64" });
}
},
.macos => {
@ -512,7 +512,7 @@ pub fn build(b: *std.Build) !void {
else => |tag| @panic(@tagName(tag)),
}
if (!is_ci) {
if (use_editor) {
compiler.linkSystemLibrary("glfw");
compiler.linkSystemLibrary("GL");
compiler.addCSourceFiles(.{