gpu-dawn: use source scanning for dawn_native_metal target

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-02-13 01:49:50 -07:00 committed by Stephen Gutekanst
parent e15c91a8b7
commit fc1f37ef2f
2 changed files with 16 additions and 23 deletions

View file

@ -602,10 +602,22 @@ fn buildLibDawnNative(b: *Builder, step: *std.build.LibExeObjStep, options: Opti
lib.linkFramework("IOSurface");
lib.linkFramework("QuartzCore");
sources.appendSlice(&.{
thisDir() ++ "/src/dawn/sources/dawn_native_metal.mm",
thisDir() ++ "/libs/dawn/src/dawn_native/metal/BackendMTL.mm",
}) catch unreachable;
scanSources(
b,
&sources,
"libs/dawn/src/dawn_native/metal/",
&.{ ".cpp", ".c", ".cc", ".m", ".mm" },
&.{},
&.{ "test", "benchmark", "mock" },
) catch unreachable;
scanSources(
b,
&sources,
"libs/dawn/src/dawn_native/",
&.{ ".m", ".mm" },
&.{},
&.{ "test", "benchmark", "mock" },
) catch unreachable;
}
if (options.linux_window_manager != null and options.linux_window_manager.? == .X11) {