Roll src/third_party/WebKit 0c3f21f:4f9ce20 (svn 202223:202224)
[chromium-blink-merge.git] / chromecast / BUILD.gn
blobf5712fe406d6b97d443c2c39302d6dad9c06e79e
1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//chromecast/chromecast.gni")
6 import("//build/config/features.gni")
7 import("//build/config/ui.gni")
8 import("//testing/test.gni")
9 import("//tools/grit/repack.gni")
10 import("//ui/ozone/ozone.gni")
12 declare_args() {
13   # TODO(slan): This most likely needs to be moved into a .gni file.
14   use_chromecast_webui = true
17 # TODO(slan): This target is being used far too broadly. We should reduce the
18 # uses of this config to targets that actually need it. (b/23814594)
19 config("config") {
20   defines = []
22   if (use_playready) {
23     defines += [ "PLAYREADY_CDM_AVAILABLE" ]
24   }
27 component("chromecast") {
28   deps = [
29     "//chromecast/base",
30     "//chromecast/base/metrics",
31     "//chromecast/crash",
32     "//chromecast/media",
33   ]
36 group("chromecast_unittests") {
37   testonly = true
39   deps = [
40     # TODO(slan): Get this target building and comment it in.
41     # "//chromecast/app:cast_shell_unittests",
42     "//chromecast/base:cast_base_unittests",
43     "//chromecast/crypto:cast_crypto_unittests",
44     "//chromecast/crash:cast_crash_unittests",
45     "//chromecast/media:cast_media_unittests",
46   ]
49 source_set("cast_shell_common") {
50   deps = [
51     # TODO(slan): add ":cast_locales_pak" (b/22959691)
52     ":cast_shell_pak",
53     "//chromecast/app",
54     "//chromecast/browser",
55     "//chromecast/common",
56     "//chromecast/common/media",
57     "//chromecast/renderer",
58   ]
61 source_set("cast_shell_media") {
62   deps = [
63     "//chromecast/browser/media",
64     "//chromecast/common/media",
65     "//chromecast/renderer/media",
66   ]
69 executable("cast_shell") {
70   sources = [
71     "app/cast_main.cc",
72   ]
74   deps = [
75     ":cast_shell_common",
76     ":cast_shell_media",
77     "//build/config/sanitizers:deps",
78     "//chromecast/app",
79     "//content/public/app:both",
80   ]
82   if (chromecast_branding != "public") {
83     deps += [ "//chromecast/internal:cast_shell_internal" ]
84   }
86   if (ozone_platform_egltest) {
87     deps += [ "//ui/ozone/platform/egltest:eglplatform_shim_x11" ]
88   }
91 repack("cast_shell_pak") {
92   sources = [
93     "$root_gen_dir/blink/public/resources/blink_image_resources_100_percent.pak",
94     "$root_gen_dir/blink/public/resources/blink_resources.pak",
95     "$root_gen_dir/chromecast/app/shell_resources.pak",
96     "$root_gen_dir/content/app/resources/content_resources_100_percent.pak",
97     "$root_gen_dir/content/app/strings/content_strings_en-US.pak",
98     "$root_gen_dir/content/content_resources.pak",
99     "$root_gen_dir/net/net_resources.pak",
100     "$root_gen_dir/ui/resources/ui_resources_100_percent.pak",
101     "$root_gen_dir/ui/resources/webui_resources.pak",
102     "$root_gen_dir/ui/strings/app_locale_settings_en-US.pak",
103     "$root_gen_dir/ui/strings/ui_strings_en-US.pak",
104   ]
106   output = "$root_out_dir/assets/cast_shell.pak"
108   deps = [
109     "//chromecast/app:resources",
110     "//content:resources",
111     "//content/app/resources",
112     "//content/app/strings",
113     "//net:net_resources",
114     "//third_party/WebKit/public:resources",
115     "//third_party/WebKit/public:image_resources_grit",
116     "//ui/resources",
117     "//ui/strings",
118   ]
120   if (chromecast_branding != "public") {
121     sources +=
122         [ "$root_gen_dir/chromecast/internal/shell/app/sound_resources.pak" ]
124     deps += [ "//chromecast/internal/shell/app:chromecast_sound_resources" ]
126     if (use_chromecast_webui) {
127       sources += [
128         "$root_gen_dir/chromecast/internal/webui/app_resources.pak",
129         "$root_gen_dir/chromecast/internal/webui/cast_webui_resources.pak",
130       ]
132       deps += [
133         "//chromecast/internal/webui:chromecast_app_resources",
134         "//chromecast/internal/webui:chromecast_webui_resources",
135       ]
136     }
137   }