summaryrefslogtreecommitdiff
path: root/build/config/ios/bundle_data_from_filelist.gni
blob: 763dc867362012cc049650df4debeb81e15bb2d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Copyright 2023 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

assert(current_os == "ios")

template("bundle_data_from_filelist") {
  assert(defined(invoker.filelist_name), "Requires setting filelist_name")

  _filelist_content = read_file(invoker.filelist_name, "list lines")
  bundle_data(target_name) {
    forward_variables_from(invoker,
                           "*",
                           [
                             "filelist_name",
                             "sources",
                           ])
    sources = filter_exclude(_filelist_content, [ "#*" ])
    if (!defined(outputs)) {
      outputs = [ "{{bundle_resources_dir}}/" +
                  "{{source_root_relative_dir}}/{{source_file_part}}" ]
    }
  }
}