chromium/device/udev_linux/BUILD.gn

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

import("//build/config/features.gni")
import("//build/config/linux/pkg_config.gni")

if (use_udev) {
  pkg_config("udev") {
    packages = [ "libudev" ]
  }

  component("udev_linux") {
    sources = [
      "scoped_udev.h",
      "udev.cc",
      "udev.h",
      "udev1_loader.cc",
      "udev1_loader.h",
      "udev_loader.cc",
      "udev_loader.h",
      "udev_watcher.cc",
      "udev_watcher.h",
    ]

    defines = [ "IS_DEVICE_UDEV_LINUX_IMPL" ]

    deps = [ "//base" ]

    configs += [ ":udev" ]
  }

  source_set("test_support") {
    testonly = true
    public_deps = [ ":udev_linux" ]
    sources = [
      "fake_udev_loader.cc",
      "fake_udev_loader.h",
    ]

    deps = [ "//base" ]
  }
}