blob: 30db653b2e2c185ae42cb2ed021fa22dfeccbf60 [file] [log] [blame]
# Copyright 2024 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
import("//build_overrides/pigweed.gni")
import("$dir_pigweed/third_party/emboss/emboss.gni")
import("$dir_pw_bloat/bloat.gni")
import("$dir_pw_build/target_types.gni")
import("$dir_pw_chrono/backend.gni")
import("$dir_pw_docgen/docs.gni")
import("$dir_pw_unit_test/test.gni")
config("public_include_path") {
include_dirs = [ "public" ]
visibility = [ ":*" ]
}
pw_doc_group("docs") {
# Also, sources with doxygen comment blocks must be added to //docs/BUILD.gn
inputs = [ "passthrough_test.cc" ]
sources = [ "docs.rst" ]
report_deps = [ ":use_passthrough_proxy_size_report" ]
}
pw_test_group("tests") {
tests = [
":pw_bluetooth_proxy_test",
":emboss_util_test",
]
}
pw_source_set("pw_bluetooth_proxy") {
public_configs = [ ":public_include_path" ]
public = [
"public/pw_bluetooth_proxy/common.h",
"public/pw_bluetooth_proxy/hci_proxy.h",
"public/pw_bluetooth_proxy/passthrough_policy.h",
"public/pw_bluetooth_proxy/proxy_policy.h",
]
public_deps = [
dir_pw_assert,
dir_pw_function,
dir_pw_span,
]
sources = [ "hci_proxy.cc" ]
}
pw_test("emboss_util_test") {
enable_if =
dir_pw_third_party_emboss != "" && pw_chrono_SYSTEM_CLOCK_BACKEND != ""
sources = [
"emboss_util.h",
"emboss_util_test.cc",
]
include_dirs = [ "." ]
deps = [
":pw_bluetooth_proxy",
"//pw_bluetooth:emboss_hci_test",
"//pw_span",
]
}
pw_test("pw_bluetooth_proxy_test") {
enable_if =
dir_pw_third_party_emboss != "" && pw_chrono_SYSTEM_CLOCK_BACKEND != ""
sources = [
"emboss_util.h",
"passthrough_test.cc",
]
include_dirs = [ "." ]
deps = [
":pw_bluetooth_proxy",
"$dir_pw_third_party/fuchsia:stdcompat",
"//pw_bluetooth:emboss_hci_commands",
"//pw_bluetooth:emboss_hci_common",
"//pw_bluetooth:emboss_hci_events",
"//pw_bluetooth:emboss_hci_h4",
]
}
pw_size_diff("use_passthrough_proxy_size_report") {
title = "pw_bluetooth_proxy Passthrough Size Report"
base = "$dir_pw_bloat:bloat_base"
binaries = [
{
target = "size_report:use_passthrough_proxy"
label = "Create and use proxy with passthrough policy"
},
]
}