gpu-dawn: use source scanning for dawn_common target
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
8f593e25d2
commit
39109c9389
1 changed files with 8 additions and 14 deletions
|
|
@ -397,20 +397,14 @@ fn buildLibDawnCommon(b: *Builder, step: *std.build.LibExeObjStep, options: Opti
|
||||||
flags.append(include("libs/dawn/src")) catch unreachable;
|
flags.append(include("libs/dawn/src")) catch unreachable;
|
||||||
|
|
||||||
var sources = std.ArrayList([]const u8).init(b.allocator);
|
var sources = std.ArrayList([]const u8).init(b.allocator);
|
||||||
for ([_][]const u8{
|
scanSources(
|
||||||
"src/common/Assert.cpp",
|
b,
|
||||||
"src/common/DynamicLib.cpp",
|
&sources,
|
||||||
"src/common/GPUInfo.cpp",
|
"libs/dawn/src/common/",
|
||||||
"src/common/Log.cpp",
|
&.{ ".cpp", ".c", ".cc" },
|
||||||
"src/common/Math.cpp",
|
&.{},
|
||||||
"src/common/RefCounted.cpp",
|
&.{ "test", "benchmark", "mock", "WindowsUtils.cpp", },
|
||||||
"src/common/Result.cpp",
|
) catch unreachable;
|
||||||
"src/common/SlabAllocator.cpp",
|
|
||||||
"src/common/SystemUtils.cpp",
|
|
||||||
}) |path| {
|
|
||||||
var abs_path = std.fs.path.join(b.allocator, &.{ thisDir(), "libs/dawn", path }) catch unreachable;
|
|
||||||
sources.append(abs_path) catch unreachable;
|
|
||||||
}
|
|
||||||
|
|
||||||
const target = (std.zig.system.NativeTargetInfo.detect(b.allocator, step.target) catch unreachable).target;
|
const target = (std.zig.system.NativeTargetInfo.detect(b.allocator, step.target) catch unreachable).target;
|
||||||
if (target.os.tag == .macos) {
|
if (target.os.tag == .macos) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue