build: replace depracted functions
This commit is contained in:
parent
cb760cbbf6
commit
a0973af030
5 changed files with 24 additions and 24 deletions
|
|
@ -35,12 +35,12 @@ pub fn link(b: *Builder, step: *std.build.LibExeObjStep, options: Options) void
|
|||
if (options.encoder) {
|
||||
step.linkLibrary(buildEncoder(b));
|
||||
step.addCSourceFile(comptime thisDir() ++ "/src/encoder/wrapper.cpp", &.{});
|
||||
step.addIncludeDir(basisu_root ++ "/encoder");
|
||||
step.addIncludePath(basisu_root ++ "/encoder");
|
||||
}
|
||||
if (options.transcoder) {
|
||||
step.linkLibrary(buildTranscoder(b));
|
||||
step.addCSourceFile(comptime thisDir() ++ "/src/transcoder/wrapper.cpp", &.{});
|
||||
step.addIncludeDir(basisu_root ++ "/transcoder");
|
||||
step.addIncludePath(basisu_root ++ "/transcoder");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -83,9 +83,9 @@ pub fn Sdk(deps: anytype) type {
|
|||
fn linkFromSource(b: *Builder, step: *std.build.LibExeObjStep, options: Options) void {
|
||||
ensureSubmodules(b.allocator) catch |err| @panic(@errorName(err));
|
||||
|
||||
step.addIncludeDir(comptime thisDir() ++ "/libs/dawn/out/Debug/gen/include");
|
||||
step.addIncludeDir(comptime thisDir() ++ "/libs/dawn/include");
|
||||
step.addIncludeDir(comptime thisDir() ++ "/src/dawn");
|
||||
step.addIncludePath(comptime thisDir() ++ "/libs/dawn/out/Debug/gen/include");
|
||||
step.addIncludePath(comptime thisDir() ++ "/libs/dawn/include");
|
||||
step.addIncludePath(comptime thisDir() ++ "/src/dawn");
|
||||
|
||||
if (options.separate_libs) {
|
||||
const lib_mach_dawn_native = buildLibMachDawnNative(b, step, options);
|
||||
|
|
@ -213,8 +213,8 @@ pub fn Sdk(deps: anytype) type {
|
|||
step.linkSystemLibraryName("dawn");
|
||||
step.linkLibCpp();
|
||||
|
||||
step.addIncludeDir(include_dir);
|
||||
step.addIncludeDir(comptime thisDir() ++ "/src/dawn");
|
||||
step.addIncludePath(include_dir);
|
||||
step.addIncludePath(comptime thisDir() ++ "/src/dawn");
|
||||
|
||||
if (options.linux_window_manager != null and options.linux_window_manager.? == .X11) {
|
||||
step.linkSystemLibraryName("X11");
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ pub fn Sdk(deps: anytype) type {
|
|||
deps.glfw.link(b, step, options.glfw_options);
|
||||
deps.gpu_dawn.link(b, step, options.gpu_dawn_options);
|
||||
step.addCSourceFile((comptime thisDir()) ++ "/src/mach_dawn.cpp", &.{"-std=c++17"});
|
||||
step.addIncludeDir((comptime thisDir()) ++ "/src");
|
||||
step.addIncludePath((comptime thisDir()) ++ "/src");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue