build: replace depracted functions

This commit is contained in:
Ali Chraghi 2022-08-27 20:33:30 +04:30 committed by Stephen Gutekanst
parent f556550501
commit 6de027bb40
2 changed files with 16 additions and 16 deletions

View file

@ -94,8 +94,8 @@ fn buildLibrary(b: *Builder, step: *std.build.LibExeObjStep, options: Options) *
}
fn addGLFWIncludes(step: *std.build.LibExeObjStep) void {
step.addIncludeDir(thisDir() ++ "/upstream/glfw/include");
step.addIncludeDir(thisDir() ++ "/upstream/vulkan_headers/include");
step.addIncludePath(thisDir() ++ "/upstream/glfw/include");
step.addIncludePath(thisDir() ++ "/upstream/vulkan_headers/include");
}
fn addGLFWSources(b: *Builder, step: *std.build.LibExeObjStep, lib: *std.build.LibExeObjStep, options: Options) void {

View file

@ -83,9 +83,9 @@ fn includeSdkMacOS(b: *Builder, step: *std.build.LibExeObjStep, options: Options
const sdk_root_dir = getSdkRoot(b.allocator, step, options.github_org, sdk_name, sdk_revision) catch unreachable;
if (options.set_sysroot) {
step.addFrameworkDir("/System/Library/Frameworks");
step.addSystemIncludeDir("/usr/include");
step.addLibPath("/usr/lib");
step.addFrameworkPath("/System/Library/Frameworks");
step.addSystemIncludePath("/usr/include");
step.addLibraryPath("/usr/lib");
var sdk_sysroot = std.fs.path.join(b.allocator, &.{ sdk_root_dir, "root/" }) catch unreachable;
b.sysroot = sdk_sysroot;
@ -93,13 +93,13 @@ fn includeSdkMacOS(b: *Builder, step: *std.build.LibExeObjStep, options: Options
}
var sdk_framework_dir = std.fs.path.join(b.allocator, &.{ sdk_root_dir, "root/System/Library/Frameworks" }) catch unreachable;
step.addFrameworkDir(sdk_framework_dir);
step.addFrameworkPath(sdk_framework_dir);
var sdk_include_dir = std.fs.path.join(b.allocator, &.{ sdk_root_dir, "root/usr/include" }) catch unreachable;
step.addSystemIncludeDir(sdk_include_dir);
step.addSystemIncludePath(sdk_include_dir);
var sdk_lib_dir = std.fs.path.join(b.allocator, &.{ sdk_root_dir, "root/usr/lib" }) catch unreachable;
step.addLibPath(sdk_lib_dir);
step.addLibraryPath(sdk_lib_dir);
}
fn includeSdkLinuxX8664(b: *Builder, step: *std.build.LibExeObjStep, options: Options) void {
@ -119,9 +119,9 @@ fn includeSdkLinuxX8664(b: *Builder, step: *std.build.LibExeObjStep, options: Op
b.allocator.free(wayland_protocols_include);
b.allocator.free(sdk_root_libs);
}
step.addSystemIncludeDir(sdk_root_includes);
step.addSystemIncludeDir(wayland_protocols_include);
step.addLibPath(sdk_root_libs);
step.addSystemIncludePath(sdk_root_includes);
step.addSystemIncludePath(wayland_protocols_include);
step.addLibraryPath(sdk_root_libs);
}
fn includeSdkLinuxAarch64(b: *Builder, step: *std.build.LibExeObjStep, options: Options) void {
@ -141,9 +141,9 @@ fn includeSdkLinuxAarch64(b: *Builder, step: *std.build.LibExeObjStep, options:
b.allocator.free(wayland_protocols_include);
b.allocator.free(sdk_root_libs);
}
step.addSystemIncludeDir(sdk_root_includes);
step.addSystemIncludeDir(wayland_protocols_include);
step.addLibPath(sdk_root_libs);
step.addSystemIncludePath(sdk_root_includes);
step.addSystemIncludePath(wayland_protocols_include);
step.addLibraryPath(sdk_root_libs);
}
fn includeSdkWindowsX8664(b: *Builder, step: *std.build.LibExeObjStep, options: Options) void {
@ -163,8 +163,8 @@ fn includeSdkWindowsX8664(b: *Builder, step: *std.build.LibExeObjStep, options:
b.allocator.free(sdk_libs);
}
step.addIncludeDir(sdk_includes);
step.addLibPath(sdk_libs);
step.addIncludePath(sdk_includes);
step.addLibraryPath(sdk_libs);
}
var cached_sdk_roots: ?std.AutoHashMap(*std.build.LibExeObjStep, []const u8) = null;