prashantv | 4025129 | 2015-04-21 21:54:22 | [diff] [blame] | 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. |
| 4 | |
slan | 93f59d1d | 2015-11-13 17:46:49 | [diff] [blame] | 5 | import("//build/config/chromecast_build.gni") |
Stephen Lanham | 3c2131cd | 2017-04-28 01:13:41 | [diff] [blame] | 6 | import("//build/config/locales.gni") |
slan | 93f59d1d | 2015-11-13 17:46:49 | [diff] [blame] | 7 | |
slan | 77bdc2e6 | 2015-09-21 17:56:26 | [diff] [blame] | 8 | # This args block should contain arguments used within the //chromecast |
| 9 | # directory. Arguments which are used in other Chrome components should |
| 10 | # be instead declared in //build/config/chromecast_build.gni. |
prashantv | 4025129 | 2015-04-21 21:54:22 | [diff] [blame] | 11 | declare_args() { |
slan | 77bdc2e6 | 2015-09-21 17:56:26 | [diff] [blame] | 12 | # chromecast_branding is used to include or exclude Google-branded components. |
| 13 | # Set it to "public" for a Chromium build. |
yucliu | 48ba4153 | 2015-07-30 21:09:08 | [diff] [blame] | 14 | chromecast_branding = "public" |
prashantv | 4025129 | 2015-04-21 21:54:22 | [diff] [blame] | 15 | |
slan | c7957aae | 2016-05-09 22:25:59 | [diff] [blame] | 16 | # The incremental build number. The Cast automated builders will set this |
| 17 | # value to indicate the buildset. Note: The default value should be greater |
| 18 | # than any value the builder may assign to prevent attempted automatic updates |
| 19 | # when the default value is used. |
| 20 | cast_build_incremental = "999999" |
bshaya | 1ba19b6 | 2016-08-04 18:50:42 | [diff] [blame] | 21 | |
| 22 | # If true, IS_CAST_DEBUG_BUILD() will evaluate to 1 in version.h. Otherwise, |
| 23 | # it will evaluate to 0. Overriding this when is_debug=false is useful for |
| 24 | # doing engineering builds. |
| 25 | cast_is_debug = is_debug |
gfhuang | 79ceb4f | 2016-09-07 06:43:03 | [diff] [blame] | 26 | |
thoren | 9540c6d | 2017-05-22 20:07:04 | [diff] [blame] | 27 | if (is_android) { |
| 28 | # If true, run receiver apps in an Android service instead of an activity. |
| 29 | display_web_contents_in_service = is_cast_audio_only |
| 30 | } |
| 31 | |
gfhuang | 79ceb4f | 2016-09-07 06:43:03 | [diff] [blame] | 32 | # If true, Chromecast WebUI resources are included in a build. |
| 33 | # TODO(antz): default to false for audio-only builds, might need further |
| 34 | # clean up (b/27119303) |
| 35 | enable_chromecast_webui = !is_cast_audio_only && !is_android |
kmackay | 3801f1a | 2017-03-15 01:24:32 | [diff] [blame] | 36 | |
| 37 | # Set true to enable assistant features. |
| 38 | enable_assistant = false |
jameswest | a0889df | 2017-06-06 02:53:46 | [diff] [blame] | 39 | |
| 40 | # Set to true on devices that support multizone. Only indicates that the |
| 41 | # device supports multizone. The command line flag --enable-multizone must |
| 42 | # still be used to enable multizone. |
| 43 | supports_multizone = is_cast_audio_only && !is_cast_desktop_build |
Bryan Henry | 35001f81 | 2017-06-13 08:17:07 | [diff] [blame] | 44 | |
Yves Arrouye | c4785f3 | 2017-07-12 02:48:07 | [diff] [blame] | 45 | # Set to true for builds targeting ARC. |
| 46 | is_android_arc = false |
| 47 | |
Bryan Henry | 35001f81 | 2017-06-13 08:17:07 | [diff] [blame] | 48 | # Set true for builds targeting Android Things. |
| 49 | is_android_things = false |
slan | c7957aae | 2016-05-09 22:25:59 | [diff] [blame] | 50 | } |
| 51 | |
sanfin | 459cccff | 2016-05-12 22:26:44 | [diff] [blame] | 52 | declare_args() { |
Nat Jeffries | 8db5596 | 2017-07-21 23:41:22 | [diff] [blame^] | 53 | # Currently android things libraries live in internal. TODO(njeff): change |
| 54 | # this when Android Things API is moved to public |
| 55 | enable_athings_loopback = is_android_things && chromecast_branding != "public" |
| 56 | } |
| 57 | |
| 58 | declare_args() { |
sanfin | 459cccff | 2016-05-12 22:26:44 | [diff] [blame] | 59 | # Use Playready CDMs for internal non-desktop builds. |
| 60 | use_playready = !is_cast_desktop_build && chromecast_branding != "public" |
| 61 | } |
| 62 | |
slan | c7957aae | 2016-05-09 22:25:59 | [diff] [blame] | 63 | # This is the release version, which takes the form <major>.<minor>. Internal |
| 64 | # builds will read the value from an internal file containing this value as a |
| 65 | # string. Public builds, lacking this file, will set a dummy value. |
| 66 | if (chromecast_branding == "public") { |
| 67 | cast_build_release = "eng." + getenv("USER") |
| 68 | } else { |
| 69 | cast_build_release = |
| 70 | read_file("//chromecast/internal/build/cast_build_release", "trim string") |
prashantv | 4025129 | 2015-04-21 21:54:22 | [diff] [blame] | 71 | } |
Stephen Lanham | 3c2131cd | 2017-04-28 01:13:41 | [diff] [blame] | 72 | |
| 73 | # All locales supported by Cast builds. This provides a single point of |
| 74 | # reference for all GN files referencing a locales list. |locales| is declared |
| 75 | # in //build/config/locales.gni. |
| 76 | cast_locales = locales |
Stephen Lanham | bd37862 | 2017-07-20 14:29:39 | [diff] [blame] | 77 | |
| 78 | # These templates are a temporary fix fo link libc++ into shared libraries and |
| 79 | # executables. These should be removed as soon as crbug.com/746091 is resolved. |
| 80 | template("cast_shared_library") { |
| 81 | shared_library(target_name) { |
| 82 | forward_variables_from(invoker, "*") |
| 83 | if (!defined(deps)) { |
| 84 | deps = [] |
| 85 | } |
| 86 | deps += [ "//build/config:exe_and_shlib_deps" ] |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | template("cast_executable") { |
| 91 | executable(target_name) { |
| 92 | forward_variables_from(invoker, "*") |
| 93 | if (!defined(deps)) { |
| 94 | deps = [] |
| 95 | } |
| 96 | deps += [ "//build/config:exe_and_shlib_deps" ] |
| 97 | } |
| 98 | } |