blob: 3e824e80fa8ab6a5ed045d7178cc70f6c9286da4 [file] [log] [blame]
# Copyright 2021 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Template to package an app extension into an app.
#
# Parameters
#
# extension_target:
# name of the extension target to package; the extension
# bundle name must be derived from the target name
#
# extension_name:
# (optional) name of the extension appex file; derived from
# the target name if omitted
#
template("extension_bundle_data") {
assert(defined(invoker.extension_target),
"extension_target must be defined for $target_name")
_extension_name = get_label_info(invoker.extension_target, "name") + ".appex"
if (defined(invoker.extension_name)) {
_extension_name = invoker.extension_name
}
bundle_data(target_name) {
public_deps = [ invoker.extension_target ]
outputs = [ "{{bundle_contents_dir}}/PlugIns/{{source_file_part}}" ]
sources = [ get_label_info(invoker.extension_target, "root_out_dir") +
"/$_extension_name" ]
}
}