[go: nahoru, domu]

blob: 1907fb611c04abe1d8917b453dfa12cfc35f34a7 [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")
Scott Violetc8240b02018-03-08 22:03:597import("//extensions/buildflags/buildflags.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 }
Mina Almasrydc22e80e2018-03-07 19:25:3778
79 # Set to true to enable a CMA media backend that allows mixed audio to be
80 # output with sync'd video.
81 enable_video_with_mixed_audio = false
slanc7957aae2016-05-09 22:25:5982}
83
sanfin459cccff2016-05-12 22:26:4484declare_args() {
Chris Kuiper23393ec2017-09-23 01:36:2985 enable_volume_tables_access =
86 is_android_things && chromecast_branding != "public"
Aidan Wolterd6c24152018-04-09 18:14:1787 is_android_things_non_public =
88 is_android_things && chromecast_branding != "public"
Nat Jeffries8db55962017-07-21 23:41:2289}
90
91declare_args() {
sanfin459cccff2016-05-12 22:26:4492 # Use Playready CDMs for internal non-desktop builds.
93 use_playready = !is_cast_desktop_build && chromecast_branding != "public"
94}
95
slanc7957aae2016-05-09 22:25:5996# This is the release version, which takes the form <major>.<minor>. Internal
97# builds will read the value from an internal file containing this value as a
98# string. Public builds, lacking this file, will set a dummy value.
99if (chromecast_branding == "public") {
100 cast_build_release = "eng." + getenv("USER")
101} else {
102 cast_build_release =
103 read_file("//chromecast/internal/build/cast_build_release", "trim string")
prashantv40251292015-04-21 21:54:22104}
Stephen Lanham3c2131cd2017-04-28 01:13:41105
106# All locales supported by Cast builds. This provides a single point of
107# reference for all GN files referencing a locales list. |locales| is declared
108# in //build/config/locales.gni.
109cast_locales = locales
Stephen Lanhambd378622017-07-20 14:29:39110
Albert Chaulke9b35dc2018-02-14 23:47:28111enable_chromecast_extensions = enable_extensions
Albert Chaulk3ae73b12018-01-17 18:34:34112
Stephen Lanhambd378622017-07-20 14:29:39113# These templates are a temporary fix fo link libc++ into shared libraries and
114# executables. These should be removed as soon as crbug.com/746091 is resolved.
Stephen Lanham4ad698a82017-07-25 21:24:51115foreach(target_type,
116 [
117 "executable",
118 "shared_library",
119 "loadable_module",
Bailey Forrest635cecc2017-11-01 01:09:40120 "source_set",
Stephen Lanham4ad698a82017-07-25 21:24:51121 ]) {
122 template("cast_${target_type}") {
123 target(target_type, target_name) {
124 forward_variables_from(invoker, "*")
Bailey Forrest635cecc2017-11-01 01:09:40125
126 configs += [ "//chromecast:cast_config" ]
127
Stephen Lanham4ad698a82017-07-25 21:24:51128 if (!defined(deps)) {
129 deps = []
130 }
Bailey Forrest635cecc2017-11-01 01:09:40131
132 if (target_type != "source_set") {
133 deps += [ "//build/config:exe_and_shlib_deps" ]
134 }
Stephen Lanhambd378622017-07-20 14:29:39135 }
Stephen Lanhambd378622017-07-20 14:29:39136 }
137}
138
Stephen Lanham4ad698a82017-07-25 21:24:51139# Set the defaults for each target. The defaults for these target wrappers
140# should match their unwrapped counterparts in BUILDCONFIG.gn. The variables
141# referenced below are declared in BUILDCONFIG.gn.
142set_defaults("cast_executable") {
143 configs = default_executable_configs
144}
145
146set_defaults("cast_shared_library") {
147 configs = default_shared_library_configs
Doug Horn37635f02017-07-28 03:12:58148 if (is_android) {
149 configs -= [ "//build/config/android:hide_all_but_jni_onload" ]
150 }
Stephen Lanham4ad698a82017-07-25 21:24:51151}
152
153set_defaults("cast_loadable_module") {
154 configs = default_shared_library_configs
155 if (is_android) {
156 configs -= [ "//build/config/android:hide_all_but_jni_onload" ]
Stephen Lanhambd378622017-07-20 14:29:39157 }
158}
Bailey Forrest635cecc2017-11-01 01:09:40159
160set_defaults("cast_source_set") {
161 configs = default_compiler_configs
162}