Only link editor libraries if actually using it

This commit is contained in:
David Gonzalez Martin 2024-05-03 18:04:53 -06:00
parent cf0a9c5142
commit 41d51ee09e

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(.{