[go: nahoru, domu]

blob: 99759f9ace817c6c82a15f093f3826c83a7a17ac [file] [log] [blame]
prashantv40251292015-04-21 21:54:221# 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.
4
slan93f59d1d2015-11-13 17:46:495import("//build/config/chromecast_build.gni")
Stephen Lanham3c2131cd2017-04-28 01:13:416import("//build/config/locales.gni")
Albert Chaulk3ae73b12018-01-17 18:34:347import("//extensions/features/features.gni")
slan93f59d1d2015-11-13 17:46:498
slan77bdc2e62015-09-21 17:56:269# This args block should contain arguments used within the //chromecast
10# directory. Arguments which are used in other Chrome components should
11# be instead declared in //build/config/chromecast_build.gni.
prashantv40251292015-04-21 21:54:2212declare_args() {
slan77bdc2e62015-09-21 17:56:2613 # chromecast_branding is used to include or exclude Google-branded components.
14 # Set it to "public" for a Chromium build.
yucliu48ba41532015-07-30 21:09:0815 chromecast_branding = "public"
prashantv40251292015-04-21 21:54:2216
slanc7957aae2016-05-09 22:25:5917 # The incremental build number. The Cast automated builders will set this
18 # value to indicate the buildset. Note: The default value should be greater
19 # than any value the builder may assign to prevent attempted automatic updates
20 # when the default value is used.
21 cast_build_incremental = "999999"
bshaya1ba19b62016-08-04 18:50:4222
23 # If true, IS_CAST_DEBUG_BUILD() will evaluate to 1 in version.h. Otherwise,
24 # it will evaluate to 0. Overriding this when is_debug=false is useful for
25 # doing engineering builds.
26 cast_is_debug = is_debug
gfhuang79ceb4f2016-09-07 06:43:0327
thoren9540c6d2017-05-22 20:07:0428 if (is_android) {
29 # If true, run receiver apps in an Android service instead of an activity.
30 display_web_contents_in_service = is_cast_audio_only
31 }
32
gfhuang79ceb4f2016-09-07 06:43:0333 # If true, Chromecast WebUI resources are included in a build.
34 # TODO(antz): default to false for audio-only builds, might need further
35 # clean up (b/27119303)
36 enable_chromecast_webui = !is_cast_audio_only && !is_android
kmackay3801f1a2017-03-15 01:24:3237
38 # Set true to enable assistant features.
39 enable_assistant = false
jameswesta0889df2017-06-06 02:53:4640
41 # Set to true on devices that support multizone. Only indicates that the
42 # device supports multizone. The command line flag --enable-multizone must
43 # still be used to enable multizone.
44 supports_multizone = is_cast_audio_only && !is_cast_desktop_build
Bryan Henry35001f812017-06-13 08:17:0745
Yves Arrouyec4785f32017-07-12 02:48:0746 # Set to true for builds targeting ARC.
47 is_android_arc = false
48
Bryan Henry35001f812017-06-13 08:17:0749 # Set true for builds targeting Android Things.
50 is_android_things = false
Aidan Wolter247e39e2017-09-12 19:29:1351
52 # Set to true to start music apps in headless mode.
53 enable_headless_music_mode = false
Aidan Wolter63fb79e2017-11-11 00:56:5754
55 # Set to true to keep Android activities alive when they are moved to the
56 # background.
57 enable_background_activities = false
Steve Fungdb75c692017-11-21 03:43:0558
59 # Set the number of lines for LogcatExtractor to send.
60 logcat_extractor_size = 512
slanc7957aae2016-05-09 22:25:5961}
62
sanfin459cccff2016-05-12 22:26:4463declare_args() {
Chris Kuiper23393ec2017-09-23 01:36:2964 enable_volume_tables_access =
65 is_android_things && chromecast_branding != "public"
Nat Jeffries8db55962017-07-21 23:41:2266}
67
68declare_args() {
sanfin459cccff2016-05-12 22:26:4469 # Use Playready CDMs for internal non-desktop builds.
70 use_playready = !is_cast_desktop_build && chromecast_branding != "public"
71}
72
slanc7957aae2016-05-09 22:25:5973# This is the release version, which takes the form <major>.<minor>. Internal
74# builds will read the value from an internal file containing this value as a
75# string. Public builds, lacking this file, will set a dummy value.
76if (chromecast_branding == "public") {
77 cast_build_release = "eng." + getenv("USER")
78} else {
79 cast_build_release =
80 read_file("//chromecast/internal/build/cast_build_release", "trim string")
prashantv40251292015-04-21 21:54:2281}
Stephen Lanham3c2131cd2017-04-28 01:13:4182
83# All locales supported by Cast builds. This provides a single point of
84# reference for all GN files referencing a locales list. |locales| is declared
85# in //build/config/locales.gni.
86cast_locales = locales
Stephen Lanhambd378622017-07-20 14:29:3987
Albert Chaulk3ae73b12018-01-17 18:34:3488# Currently extensions require use_dbus=true if it is a linux build.
89enable_chromecast_extensions = enable_extensions && (!is_linux || use_dbus)
90
Stephen Lanhambd378622017-07-20 14:29:3991# These templates are a temporary fix fo link libc++ into shared libraries and
92# executables. These should be removed as soon as crbug.com/746091 is resolved.
Stephen Lanham4ad698a82017-07-25 21:24:5193foreach(target_type,
94 [
95 "executable",
96 "shared_library",
97 "loadable_module",
Bailey Forrest635cecc2017-11-01 01:09:4098 "source_set",
Stephen Lanham4ad698a82017-07-25 21:24:5199 ]) {
100 template("cast_${target_type}") {
101 target(target_type, target_name) {
102 forward_variables_from(invoker, "*")
Bailey Forrest635cecc2017-11-01 01:09:40103
104 configs += [ "//chromecast:cast_config" ]
105
Stephen Lanham4ad698a82017-07-25 21:24:51106 if (!defined(deps)) {
107 deps = []
108 }
Bailey Forrest635cecc2017-11-01 01:09:40109
110 if (target_type != "source_set") {
111 deps += [ "//build/config:exe_and_shlib_deps" ]
112 }
Stephen Lanhambd378622017-07-20 14:29:39113 }
Stephen Lanhambd378622017-07-20 14:29:39114 }
115}
116
Stephen Lanham4ad698a82017-07-25 21:24:51117# Set the defaults for each target. The defaults for these target wrappers
118# should match their unwrapped counterparts in BUILDCONFIG.gn. The variables
119# referenced below are declared in BUILDCONFIG.gn.
120set_defaults("cast_executable") {
121 configs = default_executable_configs
122}
123
124set_defaults("cast_shared_library") {
125 configs = default_shared_library_configs
Doug Horn37635f02017-07-28 03:12:58126 if (is_android) {
127 configs -= [ "//build/config/android:hide_all_but_jni_onload" ]
128 }
Stephen Lanham4ad698a82017-07-25 21:24:51129}
130
131set_defaults("cast_loadable_module") {
132 configs = default_shared_library_configs
133 if (is_android) {
134 configs -= [ "//build/config/android:hide_all_but_jni_onload" ]
Stephen Lanhambd378622017-07-20 14:29:39135 }
136}
Bailey Forrest635cecc2017-11-01 01:09:40137
138set_defaults("cast_source_set") {
139 configs = default_compiler_configs
140}