Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
[GN][Chromecast] Replace //chromecast:config with feature-specific co…
Browse files Browse the repository at this point in the history
…nfigs.

This config target is not good style - it has remained in the build since the very first attempt to port chromecast to GN. Remove it now, and replace it with feature-specific configs. In this case, playready_config has been added to all relevant targets.

BUG=516899

Review URL: https://codereview.chromium.org/1435413002

Cr-Commit-Position: refs/heads/master@{#359678}
  • Loading branch information
slan authored and Commit bot committed Nov 13, 2015
1 parent 62b9662 commit 62afce4
Show file tree
Hide file tree
Showing 17 changed files with 27 additions and 52 deletions.
19 changes: 3 additions & 16 deletions chromecast/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,12 @@ declare_args() {
use_chromecast_webui = true
}

# TODO(slan): This target is being used far too broadly. We should reduce the
# uses of this config to targets that actually need it. (b/23814594)
config("config") {
defines = []

if (use_playready) {
defines += [ "PLAYREADY_CDM_AVAILABLE" ]
if (use_playready) {
config("playready_config") {
defines = [ "PLAYREADY_CDM_AVAILABLE" ]
}
}

component("chromecast") {
deps = [
"//chromecast/base",
"//chromecast/base/metrics",
"//chromecast/crash",
"//chromecast/media",
]
}

# A list of all public test() binaries. This is an organizational target that
# cannot be depended upon or built directly. Build cast_group_test_list instead.
cast_test_group("cast_tests") {
Expand Down
2 changes: 0 additions & 2 deletions chromecast/app/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ source_set("cast_crash_client") {
"linux/cast_crash_reporter_client.h",
]

configs += [ "//chromecast:config" ]

deps = [
"//base",
"//chromecast/base",
Expand Down
2 changes: 0 additions & 2 deletions chromecast/base/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ source_set("base") {
"task_runner_impl.h",
]

configs += [ "//chromecast:config" ]

public_deps = [
"//chromecast/base/metrics",
"//chromecast/public",
Expand Down
4 changes: 0 additions & 4 deletions chromecast/base/metrics/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ source_set("metrics") {
"grouped_histogram.h",
]

configs += [ "//chromecast:config" ]

deps = [
"//base",
]
Expand All @@ -33,6 +31,4 @@ source_set("test_support") {
deps = [
"//base",
]

configs += [ "//chromecast:config" ]
}
4 changes: 4 additions & 0 deletions chromecast/browser/media/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ source_set("media") {
"media_pipeline_host.h",
]

if (use_playready) {
public_configs = [ "//chromecast:playready_config" ]
}

deps = [
"//base",
"//chromecast/base",
Expand Down
2 changes: 0 additions & 2 deletions chromecast/crash/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ source_set("crash") {
"linux/synchronized_minidump_manager.h",
]

configs += [ "//chromecast:config" ]

deps = [
"//base",
"//breakpad:client",
Expand Down
2 changes: 0 additions & 2 deletions chromecast/crypto/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ source_set("crypto") {
"signature_cache.h",
]

configs += [ "//chromecast:config" ]

deps = [
"//base",
]
Expand Down
2 changes: 0 additions & 2 deletions chromecast/media/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ test("cast_media_unittests") {
"cma/test/run_all_unittests.cc",
]

configs += [ "//chromecast:config" ]

deps = [
":media",
"//chromecast/media/audio",
Expand Down
2 changes: 0 additions & 2 deletions chromecast/media/audio/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ source_set("audio") {
"cast_audio_output_stream.h",
]

configs += [ "//chromecast:config" ]

deps = [
"//base",
"//chromecast/base",
Expand Down
12 changes: 3 additions & 9 deletions chromecast/media/base/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ source_set("message_loop") {
"//chromecast/public/media",
]

configs += [ "//chromecast:config" ]

deps = [
"//base",
"//chromecast/media/base:libcast_media_1.0",
Expand All @@ -31,7 +29,9 @@ source_set("key_systems") {
"key_systems_common.h",
]

configs += [ "//chromecast:config" ]
if (use_playready) {
public_configs = [ "//chromecast:playready_config" ]
}

deps = [
"//base",
Expand Down Expand Up @@ -62,8 +62,6 @@ source_set("base") {
"//chromecast/public/media",
]

configs += [ "//chromecast:config" ]

deps = [
":libcast_media_1.0",
"//base",
Expand Down Expand Up @@ -100,8 +98,6 @@ source_set("libcast_media_1.0_default_core") {
"cast_media_default.cc",
]

configs += [ "//chromecast:config" ]

public_deps = [
"//chromecast/public",
"//chromecast/public/media",
Expand All @@ -123,8 +119,6 @@ shared_library("libcast_media_1.0_default") {
"cast_media_default.cc",
]

configs += [ "//chromecast:config" ]

public_deps = [
"//chromecast/public",
"//chromecast/public/media",
Expand Down
14 changes: 13 additions & 1 deletion chromecast/media/cdm/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//chromecast/chromecast.gni")

# GYP target: chromecast/media.gyp:media_cdm
source_set("cdm") {
sources = [
"browser_cdm_cast.cc",
"browser_cdm_cast.h",
"chromecast_init_data.cc",
"chromecast_init_data.h",
]

deps = [
Expand All @@ -14,5 +19,12 @@ source_set("cdm") {
"//media",
]

configs += [ "//chromecast:config" ]
if (is_android && use_playready) {
sources += [
"playready_drm_delegate_android.cc",
"playready_drm_delegate_android.h",
]

deps += [ "//media/base/android" ]
}
}
2 changes: 0 additions & 2 deletions chromecast/media/cma/backend/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,4 @@ source_set("backend") {
deps = [
"//base",
]

configs += [ "//chromecast:config" ]
}
2 changes: 0 additions & 2 deletions chromecast/media/cma/base/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ source_set("base") {
"simple_media_task_runner.h",
]

configs += [ "//chromecast:config" ]

public_deps = [
"//chromecast/public/media",
]
Expand Down
2 changes: 0 additions & 2 deletions chromecast/media/cma/ipc/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ source_set("ipc") {
"media_message_type.h",
]

configs += [ "//chromecast:config" ]

deps = [
"//base",
"//chromecast/media/cma/base",
Expand Down
2 changes: 0 additions & 2 deletions chromecast/media/cma/ipc_streamer/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ source_set("ipc_streamer") {
"video_decoder_config_marshaller.h",
]

configs += [ "//chromecast:config" ]

public_deps = [
"//chromecast/public/media",
]
Expand Down
2 changes: 0 additions & 2 deletions chromecast/media/cma/pipeline/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,4 @@ source_set("pipeline") {
"//media",
"//third_party/boringssl",
]

configs += [ "//chromecast:config" ]
}
4 changes: 4 additions & 0 deletions chromecast/renderer/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ source_set("renderer") {
]
}

if (use_playready) {
configs += [ "//chromecast:playready_config" ]
}

deps = [
"//base",
"//chromecast/base",
Expand Down

0 comments on commit 62afce4

Please sign in to comment.