Skip to content

Commit

Permalink
build.zig tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
hazeycode committed Jan 27, 2025
1 parent a50ea6f commit 5aaf806
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ pub fn build(b: *std.Build) void {
const src_dir = "libs/glfw/src/";
switch (target.result.os.tag) {
.windows => {
glfw.linkSystemLibrary("gdi32");
glfw.linkSystemLibrary("user32");
glfw.linkSystemLibrary("shell32");
glfw.addCSourceFiles(.{
.files = &.{
src_dir ++ "platform.c",
Expand Down Expand Up @@ -93,19 +90,6 @@ pub fn build(b: *std.Build) void {
});
},
.macos => {
if (b.lazyDependency("system_sdk", .{})) |system_sdk| {
glfw.addFrameworkPath(system_sdk.path("macos12/System/Library/Frameworks"));
glfw.addSystemIncludePath(system_sdk.path("macos12/usr/include"));
glfw.addLibraryPath(system_sdk.path("macos12/usr/lib"));
}
glfw.linkSystemLibrary("objc");
glfw.linkFramework("IOKit");
glfw.linkFramework("CoreFoundation");
glfw.linkFramework("Metal");
glfw.linkFramework("AppKit");
glfw.linkFramework("CoreServices");
glfw.linkFramework("CoreGraphics");
glfw.linkFramework("Foundation");
glfw.addCSourceFiles(.{
.files = &.{
src_dir ++ "platform.c",
Expand Down Expand Up @@ -135,17 +119,6 @@ pub fn build(b: *std.Build) void {
});
},
.linux => {
if (b.lazyDependency("system_sdk", .{})) |system_sdk| {
glfw.addSystemIncludePath(system_sdk.path("linux/include"));
glfw.addSystemIncludePath(system_sdk.path("linux/include/wayland"));
glfw.addIncludePath(b.path(src_dir ++ "wayland"));

if (target.result.cpu.arch.isX86()) {
glfw.addLibraryPath(system_sdk.path("linux/lib/x86_64-linux-gnu"));
} else {
glfw.addLibraryPath(system_sdk.path("linux/lib/aarch64-linux-gnu"));
}
}
glfw.addCSourceFiles(.{
.files = &.{
src_dir ++ "platform.c",
Expand Down

0 comments on commit 5aaf806

Please sign in to comment.