1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 2 # Use of this source code is governed by a BSD-style license that can be 3 # found in the LICENSE file. 4 5 source_ids = "//third_party/usb_ids/usb.ids" 6 generated_ids = "$target_gen_dir/usb_ids_gen.cc" 7 8 source_set("usb") { 9 sources = [ 10 "usb_context.cc", 11 "usb_context.h", 12 "usb_descriptors.cc", 13 "usb_descriptors.h", 14 "usb_device_impl.cc", 15 "usb_device_impl.h", 16 "usb_device.h", 17 "usb_device_filter.cc", 18 "usb_device_filter.h", 19 "usb_device_handle_impl.cc", 20 "usb_device_handle_impl.h", 21 "usb_device_handle.h", 22 "usb_error.cc", 23 "usb_error.h", 24 "usb_ids.cc", 25 "usb_ids.h", 26 "usb_service.h", 27 "usb_service_impl.cc", 28 generated_ids, 29 ] 30 31 deps = [ 32 ":usb_device_ids", 33 "//base", 34 "//base/third_party/dynamic_annotations", 35 "//net", 36 "//third_party/libusb", 37 ] 38 39 if (is_linux) { 40 configs += [ "//build/config/linux:udev" ] 41 } 42 } 43 44 action("usb_device_ids") { 45 script = "//device/usb/tools/usb_ids.py" 46 inputs = [ source_ids ] 47 outputs = [ generated_ids ] 48 args = [ 49 "-i", rebase_path(source_ids, root_build_dir), 50 "-o", rebase_path(generated_ids, root_build_dir), 51 ] 52 53 # Only the device_usb target can depend on us. 54 visibility = [ ":usb" ] 55 } 56