xref: /aosp_15_r20/external/skia/src/gpu/graphite/mtl/BUILD.bazel (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1load("//bazel:skia_rules.bzl", "skia_objc_library", "split_srcs_and_hdrs")
2
3package(
4    default_applicable_licenses = ["//:license"],
5)
6
7licenses(["notice"])
8
9METAL_FILES = [
10    "MtlBackendSemaphore.mm",
11    "MtlBackendTexture.mm",
12    "MtlBlitCommandEncoder.h",
13    "MtlBuffer.h",
14    "MtlBuffer.mm",
15    "MtlCaps.h",
16    "MtlCaps.mm",
17    "MtlCommandBuffer.h",
18    "MtlCommandBuffer.mm",
19    "MtlComputeCommandEncoder.h",
20    "MtlComputePipeline.h",
21    "MtlComputePipeline.mm",
22    "MtlGraphicsPipeline.h",
23    "MtlGraphicsPipeline.mm",
24    "MtlGraphiteTypes.mm",
25    "MtlGraphiteUtils.mm",
26    "MtlGraphiteUtilsPriv.h",
27    "MtlQueueManager.h",
28    "MtlQueueManager.mm",
29    "MtlRenderCommandEncoder.h",
30    "MtlResourceProvider.h",
31    "MtlResourceProvider.mm",
32    "MtlSampler.h",
33    "MtlSampler.mm",
34    "MtlSharedContext.h",
35    "MtlSharedContext.mm",
36    "MtlTexture.h",
37    "MtlTexture.mm",
38    "MtlTextureInfo.mm",
39]
40
41split_srcs_and_hdrs(
42    name = "mtl",
43    files = METAL_FILES,
44)
45
46skia_objc_library(
47    name = "graphite_native_metal",
48    srcs = [
49        ":mtl_hdrs",
50        ":mtl_srcs",
51    ],
52    hdrs = [
53        "//include/gpu:shared_gpu_hdrs",
54        "//include/gpu/graphite:public_hdrs",
55        "//include/gpu/graphite/mtl:public_hdrs",
56        "//include/gpu/mtl:public_hdrs",
57        "//include/ports:core_foundation_hdrs",
58    ],
59    defines = ["SK_METAL"],
60    sdk_frameworks = [
61        "Foundation",
62        "Metal",
63    ],
64    visibility = ["//:__pkg__"],
65    deps = [
66        "//:core",
67        "//src/base",
68        "//src/core:core_priv",
69        "//src/gpu",
70        "//src/gpu/graphite",
71        "//src/gpu/mtl:gpu_mtl",
72    ],
73)
74