blob: 8eb04efb28983d6f26057c7fba1cf5676ea9d25b [file] [log] [blame]
# Copyright 2018 The Chromium OS 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("//common-mk/pkg_config.gni")
group("all") {
deps = [
":btdispatch",
":libcommon",
":libdispatcher",
]
if (use.test) {
deps += [ ":bluetooth_test" ]
}
}
pkg_config("target_defaults") {
# NOSORT
pkg_deps = [
"libcros_config",
"dbus-1",
"libbrillo",
"libchrome",
# system_api depends on protobuf (or protobuf-lite). It must appear
# before protobuf here or the linker flags won't be in the right
# order.
"system_api",
]
if (use.fuzzer) {
pkg_deps += [ "protobuf" ]
} else {
pkg_deps += [ "protobuf-lite" ]
}
}
static_library("libcommon") {
sources = [
"common/dbus_daemon.cc",
"common/exported_object_manager_wrapper.cc",
"common/property.cc",
]
configs += [ ":target_defaults" ]
}
static_library("libdispatcher") {
sources = [
"dispatcher/dispatcher_daemon.cc",
"dispatcher/dispatcher_debug_manager.cc",
]
configs += [ ":target_defaults" ]
}
executable("btdispatch") {
sources = [ "dispatcher/main.cc" ]
configs += [ ":target_defaults" ]
deps = [
":libcommon",
":libdispatcher",
]
}
if (use.test) {
pkg_config("test_config") {
pkg_deps = [ "libchrome-test" ]
}
executable("bluetooth_test") {
sources = [
"common/exported_object_manager_wrapper_test.cc",
"common/property_test.cc",
]
configs += [
"//common-mk:test",
":target_defaults",
":test_config",
]
deps = [
":libcommon",
":libdispatcher",
"//common-mk/testrunner",
]
}
}