[go: nahoru, domu]

blob: e3a34661f90b418dbc930b4b139efb3f6029e28a [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
Zhiheng Vincent Li7b37d582018-01-24 03:44:5459 # Set to true to use CastWebContentsFragment instead of CastWebContentsActivity
60 # to run cast receiver app.
61 # TODO(thoren) merge this flag with display_web_contents_in_service
62 enable_cast_fragment = false
63
Steve Fungdb75c692017-11-21 03:43:0564 # Set the number of lines for LogcatExtractor to send.
65 logcat_extractor_size = 512
Sandeep Vijayasekar4ddbad72018-01-25 02:20:1166
67 if (is_android) {
68 # Set to true to get logcat from a remote service
69 # If false, will only get the logs of the app.
70 use_remote_service_logcat = false
71
72 # Set the package name and class path for the component which will provide device logs
73 # Values defined in eureka-internal
74 # These values are unused if use_remote_service_logcat is false
75 device_logs_provider_package = ""
76 device_logs_provider_class = ""
77 }
slanc7957aae2016-05-09 22:25:5978}
79
sanfin459cccff2016-05-12 22:26:4480declare_args() {
Chris Kuiper23393ec2017-09-23 01:36:2981 enable_volume_tables_access =
82 is_android_things && chromecast_branding != "public"
Nat Jeffries8db55962017-07-21 23:41:2283}
84
85declare_args() {
sanfin459cccff2016-05-12 22:26:4486 # Use Playready CDMs for internal non-desktop builds.
87 use_playready = !is_cast_desktop_build && chromecast_branding != "public"
88}
89
slanc7957aae2016-05-09 22:25:5990# This is the release version, which takes the form <major>.<minor>. Internal
91# builds will read the value from an internal file containing this value as a
92# string. Public builds, lacking this file, will set a dummy value.
93if (chromecast_branding == "public") {
94 cast_build_release = "eng." + getenv("USER")
95} else {
96 cast_build_release =
97 read_file("//chromecast/internal/build/cast_build_release", "trim string")
prashantv40251292015-04-21 21:54:2298}
Stephen Lanham3c2131cd2017-04-28 01:13:4199
100# All locales supported by Cast builds. This provides a single point of
101# reference for all GN files referencing a locales list. |locales| is declared
102# in //build/config/locales.gni.
103cast_locales = locales
Stephen Lanhambd378622017-07-20 14:29:39104
Albert Chaulke9b35dc2018-02-14 23:47:28105enable_chromecast_extensions = enable_extensions
Albert Chaulk3ae73b12018-01-17 18:34:34106
Stephen Lanhambd378622017-07-20 14:29:39107# These templates are a temporary fix fo link libc++ into shared libraries and
108# executables. These should be removed as soon as crbug.com/746091 is resolved.
Stephen Lanham4ad698a82017-07-25 21:24:51109foreach(target_type,
110 [
111 "executable",
112 "shared_library",
113 "loadable_module",
Bailey Forrest635cecc2017-11-01 01:09:40114 "source_set",
Stephen Lanham4ad698a82017-07-25 21:24:51115 ]) {
116 template("cast_${target_type}") {
117 target(target_type, target_name) {
118 forward_variables_from(invoker, "*")
Bailey Forrest635cecc2017-11-01 01:09:40119
120 configs += [ "//chromecast:cast_config" ]
121
Stephen Lanham4ad698a82017-07-25 21:24:51122 if (!defined(deps)) {
123 deps = []
124 }
Bailey Forrest635cecc2017-11-01 01:09:40125
126 if (target_type != "source_set") {
127 deps += [ "//build/config:exe_and_shlib_deps" ]
128 }
Stephen Lanhambd378622017-07-20 14:29:39129 }
Stephen Lanhambd378622017-07-20 14:29:39130 }
131}
132
Stephen Lanham4ad698a82017-07-25 21:24:51133# Set the defaults for each target. The defaults for these target wrappers
134# should match their unwrapped counterparts in BUILDCONFIG.gn. The variables
135# referenced below are declared in BUILDCONFIG.gn.
136set_defaults("cast_executable") {
137 configs = default_executable_configs
138}
139
140set_defaults("cast_shared_library") {
141 configs = default_shared_library_configs
Doug Horn37635f02017-07-28 03:12:58142 if (is_android) {
143 configs -= [ "//build/config/android:hide_all_but_jni_onload" ]
144 }
Stephen Lanham4ad698a82017-07-25 21:24:51145}
146
147set_defaults("cast_loadable_module") {
148 configs = default_shared_library_configs
149 if (is_android) {
150 configs -= [ "//build/config/android:hide_all_but_jni_onload" ]
Stephen Lanhambd378622017-07-20 14:29:39151 }
152}
Bailey Forrest635cecc2017-11-01 01:09:40153
154set_defaults("cast_source_set") {
155 configs = default_compiler_configs
156}