naiveproxy/services/device/hid/BUILD.gn

93 lines
2.0 KiB
Plaintext
Raw Normal View History

2018-08-15 01:19:20 +03:00
# Copyright 2014 The Chromium Authors. All rights reserved.
# 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("//testing/libfuzzer/fuzzer_test.gni")
source_set("hid") {
# HID is not implemented on Android and we want to be particularly careful
# about not bloating binary size by accidentially including it.
assert(!is_android)
sources = [
"hid_connection.cc",
"hid_connection.h",
"hid_connection_impl.cc",
"hid_connection_impl.h",
"hid_connection_linux.cc",
"hid_connection_linux.h",
"hid_connection_mac.cc",
"hid_connection_mac.h",
"hid_connection_win.cc",
"hid_connection_win.h",
"hid_device_info.cc",
"hid_device_info.h",
"hid_manager_impl.cc",
"hid_manager_impl.h",
"hid_service.cc",
"hid_service.h",
"hid_service_mac.cc",
"hid_service_mac.h",
"hid_service_win.cc",
"hid_service_win.h",
]
deps = [
"//base",
"//components/device_event_log",
"//device/base",
"//services/device/public/cpp/hid",
"//services/device/public/mojom",
]
if (is_linux && use_udev) {
sources += [
"hid_service_linux.cc",
"hid_service_linux.h",
"input_service_linux.cc",
"input_service_linux.h",
]
deps += [ "//device/udev_linux" ]
}
if (is_chromeos) {
deps += [ "//chromeos" ]
}
if (is_win) {
libs = [
"hid.lib",
"setupapi.lib",
]
}
}
source_set("mocks") {
testonly = true
sources = [
"mock_hid_connection.cc",
"mock_hid_connection.h",
"mock_hid_service.cc",
"mock_hid_service.h",
]
public_deps = [
":hid",
"//base",
]
}
fuzzer_test("hid_report_descriptor_fuzzer") {
sources = [
"hid_report_descriptor_fuzzer.cc",
]
deps = [
"//services/device/public/cpp/hid",
"//services/device/public/mojom",
]
seed_corpus = "fuzz_corpus"
libfuzzer_options = [ "max_len=2048" ]
}