Revert "glfw: system_sdk: use addIncludeDir over addSystemIncludeDir"

This reverts commit 5f382f9365.

I forgot that system include dirs also silence some warnings that are
present in system headers, so we can't really do this.
This commit is contained in:
Stephen Gutekanst 2022-03-06 02:05:45 -07:00
parent 9b3d6500e8
commit 09579e649d

View file

@ -77,7 +77,7 @@ fn includeSdkMacOS(b: *Builder, step: *std.build.LibExeObjStep, options: Options
if (options.set_sysroot) { if (options.set_sysroot) {
step.addFrameworkDir("/System/Library/Frameworks"); step.addFrameworkDir("/System/Library/Frameworks");
step.addIncludeDir("/usr/include"); step.addSystemIncludeDir("/usr/include");
step.addLibPath("/usr/lib"); step.addLibPath("/usr/lib");
var sdk_sysroot = std.fs.path.join(b.allocator, &.{ sdk_root_dir, "root/" }) catch unreachable; var sdk_sysroot = std.fs.path.join(b.allocator, &.{ sdk_root_dir, "root/" }) catch unreachable;
@ -89,7 +89,7 @@ fn includeSdkMacOS(b: *Builder, step: *std.build.LibExeObjStep, options: Options
step.addFrameworkDir(sdk_framework_dir); step.addFrameworkDir(sdk_framework_dir);
var sdk_include_dir = std.fs.path.join(b.allocator, &.{ sdk_root_dir, "root/usr/include" }) catch unreachable; var sdk_include_dir = std.fs.path.join(b.allocator, &.{ sdk_root_dir, "root/usr/include" }) catch unreachable;
step.addIncludeDir(sdk_include_dir); step.addSystemIncludeDir(sdk_include_dir);
var sdk_lib_dir = std.fs.path.join(b.allocator, &.{ sdk_root_dir, "root/usr/lib" }) catch unreachable; var sdk_lib_dir = std.fs.path.join(b.allocator, &.{ sdk_root_dir, "root/usr/lib" }) catch unreachable;
step.addLibPath(sdk_lib_dir); step.addLibPath(sdk_lib_dir);
@ -112,8 +112,8 @@ fn includeSdkLinuxX8664(b: *Builder, step: *std.build.LibExeObjStep, options: Op
b.allocator.free(wayland_protocols_include); b.allocator.free(wayland_protocols_include);
b.allocator.free(sdk_root_libs); b.allocator.free(sdk_root_libs);
} }
step.addIncludeDir(sdk_root_includes); step.addSystemIncludeDir(sdk_root_includes);
step.addIncludeDir(wayland_protocols_include); step.addSystemIncludeDir(wayland_protocols_include);
step.addLibPath(sdk_root_libs); step.addLibPath(sdk_root_libs);
} }