| # Copyright 2017 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/cpp/sdk_library.gni") |
| |
| # A source set that can be exported to an SDK. |
| # |
| # An equivalent to the built-in source_set which adds an SDK atom declaration to |
| # allow the set to be included in an SDK as sources. |
| # |
| # Parameters |
| # |
| # category (required) |
| # Publication level of the library in SDKs. |
| # See //build/sdk/sdk_atom.gni. |
| # |
| # sdk_name (optional) |
| # Name of the library in the SDK. |
| # If not specified, a name is inferred from the target's label. |
| # |
| # source_dir (optional) |
| # If set, path to the base directory of the sources. |
| # This is useful if the sources are generated and therefore not hosted |
| # directly under the directory where the GN rules are declared. |
| |
| template("sdk_source_set") { |
| sdk_library(target_name) { |
| forward_variables_from(invoker, "*") |
| |
| type = "source_set" |
| } |
| } |