chromium/components/metal_util/BUILD.gn

# Copyright 2017 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

assert(is_apple)

import("//testing/test.gni")

component("metal_util") {
  output_name = "metal"

  defines = [ "METAL_UTIL_IMPLEMENTATION" ]

  sources = [
    "device.h",
    "device.mm",
    "hdr_copier_layer.h",
    "hdr_copier_layer.mm",
    "metal_util_export.h",
  ]

  deps = [
    "//base",
    "//components/crash/core/common:crash_key",
    "//skia:skcms",
    "//ui/gfx",
  ]

  frameworks = [
    "IOSurface.framework",
    "Metal.framework",
    "MetalKit.framework",
    "QuartzCore.framework",
  ]

  if (is_mac) {
    sources += [
      "device_removal.h",
      "device_removal.mm",
    ]
    frameworks += [ "Cocoa.framework" ]
  }
}