# 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.
source_ids = "//third_party/usb_ids/usb.ids"
generated_ids = "$target_gen_dir/usb_ids_gen.cc"
action("usb_device_ids") {
script = "//services/device/public/cpp/usb/tools/usb_ids.py"
inputs = [ source_ids ]
outputs = [ generated_ids ]
args = [
"-i",
rebase_path(source_ids, root_build_dir),
"-o",
rebase_path(generated_ids, root_build_dir),
]
# Only the "usb" target in this file can depend on us.
visibility = [ ":usb" ]
}
source_set("usb") {
sources = [
"usb_ids.cc",
"usb_ids.h",
"usb_utils.cc",
"usb_utils.h",
generated_ids,
]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
deps = [
":usb_device_ids",
"//services/device/public/mojom:usb",
]
}