summaryrefslogtreecommitdiffstats
path: root/chromecast/BUILD.gn
blob: feb33a5caf8218268b51b027753b00b9618dcf64 (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# Copyright 2015 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("//chromecast/chromecast.gni")
import("//build/config/features.gni")
import("//build/config/ui.gni")
import("//testing/test.gni")
import("//tools/grit/repack.gni")
import("//ui/ozone/ozone.gni")

config("config") {
  defines = []

  if (use_playready) {
    defines += [ "PLAYREADY_CDM_AVAILABLE" ]
  }
}

component("chromecast") {
  deps = [
    "//chromecast/base",
    "//chromecast/base/metrics",
    "//chromecast/crash",
    "//chromecast/media",
  ]
}

group("chromecast_unittests") {
  testonly = true

  deps = [
    # TODO(slan): Get this target building and comment it in.
    # "//chromecast/app:cast_shell_unittests",
    "//chromecast/base:cast_base_unittests",
    "//chromecast/crash:cast_crash_unittests",
    "//chromecast/media:cast_media_unittests",
  ]
}

source_set("cast_shell_common") {
  deps = [
    # TODO(slan): add ":cast_locales_pak" (b/22959691)
    ":cast_shell_pak",
    "//chromecast/app",
    "//chromecast/browser",
    "//chromecast/common",
    "//chromecast/common/media",
    "//chromecast/renderer",
  ]
}

source_set("cast_shell_media") {
  deps = [
    "//chromecast/browser/media",
    "//chromecast/common/media",
    "//chromecast/renderer/media",
  ]
}

executable("cast_shell") {
  sources = [
    "app/cast_main.cc",
  ]

  deps = [
    ":cast_shell_common",
    ":cast_shell_media",
    "//chromecast/app",
    "//content/public/app:both",
  ]

  if (ozone_platform_egltest) {
    deps += [ "//ui/ozone/platform/egltest:eglplatform_shim_x11" ]
  }
}

repack("cast_shell_pak") {
  sources = [
    "$root_gen_dir/blink/public/resources/blink_image_resources_100_percent.pak",
    "$root_gen_dir/blink/public/resources/blink_resources.pak",
    "$root_gen_dir/chromecast/app/shell_resources.pak",
    "$root_gen_dir/content/app/resources/content_resources_100_percent.pak",
    "$root_gen_dir/content/app/strings/content_strings_en-US.pak",
    "$root_gen_dir/content/content_resources.pak",
    "$root_gen_dir/net/net_resources.pak",
    "$root_gen_dir/ui/resources/ui_resources_100_percent.pak",
    "$root_gen_dir/ui/resources/webui_resources.pak",
    "$root_gen_dir/ui/strings/app_locale_settings_en-US.pak",
    "$root_gen_dir/ui/strings/ui_strings_en-US.pak",
  ]

  if (chromecast_branding != "public" && use_chromecast_webui) {
    sources += [
      # TODO(slan): Update these paths to be accurate for internal builds.
    ]
  }

  output = "$root_out_dir/assets/cast_shell.pak"

  deps = [
    "//chromecast/app:resources",
    "//content:resources",
    "//content/app/resources",
    "//content/app/strings",
    "//net:net_resources",
    "//third_party/WebKit/public:resources",
    "//third_party/WebKit/public:image_resources_grit",
    "//ui/resources",
    "//ui/strings",
  ]

  if (chromecast_branding != "public" && use_chromecast_webui) {
    deps += [
      # TODO(slan): Update these paths to be accurate for internal builds.
    ]
  }
}