summaryrefslogtreecommitdiff
path: root/chromium/chrome/browser/media/kaleidoscope/BUILD.gn
blob: 45446236046a05ff34886445ef3913e63ac88847 (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 2020 The Chromium 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("//chrome/browser/buildflags.gni")
import("//tools/grit/grit_rule.gni")

# If the ENABLE_KALEIDOSCOPE flag is enabled and src-internal is available then
# include the internal resources. Otherwise, empty resources are used.
if (enable_kaleidoscope) {
  grit("kaleidoscope_resources") {
    source = "kaleidoscope_internal_resources.grd"
    outputs = [
      "grit/kaleidoscope_resources.h",
      "kaleidoscope_resources.pak",
    ]
    grit_flags = [
      "-E",
      "root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir),
    ]
    deps = [
      "//chrome/browser/media/kaleidoscope/internal:kaleidoscope_strings",
      "//chrome/browser/media/kaleidoscope/internal/resources:content",
      "//chrome/browser/media/kaleidoscope/mojom:mojom_js",
      "//url/mojom:url_mojom_gurl_js",
    ]
  }
} else {
  grit("kaleidoscope_resources") {
    source = "kaleidoscope_resources.grd"
    outputs = [
      "grit/kaleidoscope_resources.h",
      "kaleidoscope_resources.pak",
    ]
    grit_flags = [
      "-E",
      "root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir),
    ]
    deps = [
      "//chrome/browser/media/kaleidoscope/mojom:mojom_js",
      "//url/mojom:url_mojom_gurl_js",
    ]
  }
}