blob: 530ed7482a90253ae25d7d15105cf2a4e911e602 [file] [log] [blame]
# Copyright 2019 The Fuchsia 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/banjo/banjo.gni")
# This template simply defers to the `banjo` template used in the Fuchsia
# GN build.
template("banjo_library") {
main_target_name = target_name
# List a set of prefixes that do not need the banjo_dummy() target.
# These are (for now):
# * "ddk.protocol.*"
# * "ddk.hw.*"
target_type = "banjo"
if (string_replace("//$target_name", "//ddk.protocol.", "") ==
"//$target_name" &&
string_replace("//$target_name", "//ddk.hw.", "") ==
"//$target_name") {
target_type = "banjo_dummy"
}
target(target_type, main_target_name) {
forward_variables_from(invoker, "*", [
"deps",
"public_deps",
"sdk" ])
name = main_target_name
deps = []
if (defined(invoker.public_deps)) {
deps += invoker.public_deps
}
}
}