blob: 00497605470b34506f5444c95ca89adadd5f7487 [file] [log] [blame]
/*
* Copyright 2018-present Facebook, Inc.
*
* 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
*
* http://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.
*/
{namespace apple_common}
/***/
{template .headers_arg}
{call buck.arg}
{param name : 'headers' /}
{param default : '[]' /}
{param desc}
The set of header files that are made available for inclusion to the source files in this
target. These should be specified as either a list of header files or a dictionary of header names
to header files. The header names can contain forward slashes (<code>/</code>). If a list of
header files is specified, the headers can be imported
with <code>#import "$HEADER_PATH_PREFIX/$HEADER_NAME"</code> or <code>#import
"$HEADER_NAME"</code>, where <code>$HEADER_PATH_PREFIX</code> is the value of
the target's <code>header_path_prefix</code> attribute, and <code>$HEADER_NAME</code> is
the filename of the header file. If a dictionary is specified, each header can be imported
with <code>#import "$HEADER_NAME"</code>, where <code>$HEADER_NAME</code> is the key
corresponding to this file. In this case, the <code>header_path_prefix</code> attribute is
ignored. In either case, quotes in the import statements can be replaced with angle brackets.
{/param}
{/call}
{/template}
/***/
{template .exported_headers_arg}
{call buck.arg}
{param name : 'exported_headers' /}
{param default : '[]' /}
{param desc}
The set of header files that are made available for inclusion to the source files in this
target and all targets that transitively depend on this one. These should be specified as
either a list of header files or a dictionary of header names
to header files. The header names can contain forward slashes (<code>/</code>). If a list of
header files is specified, the headers can be imported
with <code>#import "$HEADER_PATH_PREFIX/$HEADER_NAME"</code> or, if a header file that belongs to
the same rule is being imported, with <code>#import
"$HEADER_NAME"</code>, where <code>$HEADER_PATH_PREFIX</code> is the value of
the target's <code>header_path_prefix</code> attribute, and <code>$HEADER_NAME</code> is
the filename of the header file. If a dictionary is specified, each header can be imported
with <code>#import "$HEADER_NAME"</code>, where <code>$HEADER_NAME</code> is the key
corresponding to this file. In this case, the <code>header_path_prefix</code> attribute is
ignored. In either case, quotes in the import statements can be replaced with angle brackets.
{/param}
{/call}
{/template}
/***/
{template .header_path_prefix_arg}
{call buck.arg}
{param name : 'header_path_prefix' /}
{param default : 'name' /}
{param desc}
A path prefix when including headers of this target. For example, headers from a library defined
using
{literal}<pre class="prettyprint lang-py">
apple_library(
name = "Library",
headers = glob(["**/*.h"]),
header_path_prefix = "Lib",
)
</pre>{/literal}
can be imported using following mapping
{literal}<pre>
Library/SubDir/Header1.h -> Lib/Header1.h
Library/Header2.h -> Lib/Header2.h
</pre>{/literal}
Defaults to the short name of the target. Can contain forward slashes (<code>/</code>), but
cannot start with one. See <code>headers</code> for more information.
{/param}
{/call}
{/template}
/***/
{template .frameworks_arg}
{call buck.arg}
{param name : 'frameworks' /}
{param default : '[]' /}
{param desc}
A list of system frameworks that the code in this target uses. Each entry should be a path
starting with <code>$SDKROOT</code> or <code>$PLATFORM_DIR</code> to denote that the rest of the
path is relative to the root of the SDK used for the build or to the platform toolchain
directory.
{/param}
{/call}
{/template}
/***/
{template .info_plist_arg}
{call buck.arg}
{param name: 'info_plist' /}
{param desc}
A path to an <code>Info.plist</code> file that will be placed in the bundle. The specified file
will be processed by substituting variable names with their values
(see <code>info_plist_substitutions</code> for more information).
{/param}
{/call}
{/template}
/***/
{template .info_plist_substitutions_arg}
{call buck.arg}
{param name: 'info_plist_substitutions' /}
{{param default : '{}' /}}
{param desc}
A dictionary that assigns variable names to their values. It is used for variable
substitution when processing the file specified in <code>info_plist</code>. For example if this
argument is set to <code>{{'{\'VAR\': \'MyValue\'}'}}</code>, then each occurrence of <code>
$(VAR)</code> or <code>{{'${VAR}'}}</code> in the file will be replaced by <code>MyValue</code>.
{/param}
{/call}
{/template}
/***/
{template .extra_xcode_sources}
{call buck.arg}
{param name : 'extra_xcode_sources' /}
{param default: '[]' /}
{param desc}
When the project is generated, this is the list of files that will added to the build phase
"Compile Sources" of the given target.
{/param}
{/call}
{/template}
/***/
{template .extra_xcode_files}
{call buck.arg}
{param name : 'extra_xcode_files' /}
{param default: '[]' /}
{param desc}
When the project is generated, this is the list of files that will added to the project.
Those files won't be added to the build phase "Compile Sources".
{/param}
{/call}
{/template}