summaryrefslogtreecommitdiff
path: root/chromium/chrome/browser/resources/webapks/BUILD.gn
blob: 255053d1b3497074840b9a2502f5ecf9741d6bb6 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Copyright 2018 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//chrome/common/features.gni")
import("//tools/grit/grit_rule.gni")
import("//tools/typescript/ts_library.gni")
import("//ui/webui/resources/tools/generate_grd.gni")

ts_library("build_ts") {
  root_dir = "."
  out_dir = "$target_gen_dir/tsc"
  in_files = [ "about_webapks.ts" ]
  deps = [ "//ui/webui/resources:library" ]

  definitions = [ "//tools/typescript/definitions/chrome_send.d.ts" ]
}

generate_grd("build_grd") {
  grd_prefix = "webapks"
  out_grd = "$target_gen_dir/resources.grd"
  deps = [ ":build_ts" ]
  manifest_files =
      filter_include(get_target_outputs(":build_ts"), [ "*.manifest" ])
  input_files = [
    "about_webapks.css",
    "about_webapks.html",
  ]
  input_files_base_dir = rebase_path(".", "//")
}

grit("resources") {
  source = "$target_gen_dir/resources.grd"
  deps = [ ":build_grd" ]
  enable_input_discovery_for_gn_analyze = false
  defines = chrome_grit_defines
  outputs = [
    "grit/webapks_resources.h",
    "grit/webapks_resources_map.cc",
    "grit/webapks_resources_map.h",
    "webapks_resources.pak",
  ]
  output_dir = "$root_gen_dir/chrome"
}