chromium/media/device_monitors/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.

import("//media/media_options.gni")

source_set("device_monitors") {
  # Do not expand the visibility here without double-checking with OWNERS, this
  # is a roll-up target which is part of the //media component. Most other DEPs
  # should be using //media and not directly DEP this roll-up target.
  visibility = [ "//media" ]

  sources = []

  configs += [ "//media:subcomponent_config" ]

  deps = [
    "//base",
    "//media/audio",
    "//media/base",
  ]

  if (use_udev) {
    deps += [ "//device/udev_linux" ]
    sources += [
      "device_monitor_udev.cc",
      "device_monitor_udev.h",
    ]
  }

  if (is_mac) {
    deps += [ "//media/base/mac" ]
    sources += [
      "device_monitor_mac.h",
      "device_monitor_mac.mm",
    ]
    frameworks = [ "Foundation.framework" ]
  }

  if (is_win) {
    sources += [
      "system_message_window_win.cc",
      "system_message_window_win.h",
    ]
  }
}

source_set("unit_tests") {
  testonly = true
  sources = []

  deps = [
    "//base",
    "//base/test:test_support",
    "//media:test_support",
    "//testing/gmock",
    "//testing/gtest",
  ]

  if (is_win) {
    sources += [ "system_message_window_win_unittest.cc" ]
  }
}