Skip to content

Commit

Permalink
Fix some GN issues in chromecast/
Browse files Browse the repository at this point in the history
BUG= b/17615224

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

Cr-Commit-Position: refs/heads/master@{#337738}
  • Loading branch information
kmackay authored and Commit bot committed Jul 8, 2015
1 parent 22c8692 commit f55d90e
Show file tree
Hide file tree
Showing 13 changed files with 171 additions and 31 deletions.
15 changes: 11 additions & 4 deletions chromecast/app/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,38 @@

import("//testing/test.gni")

component("cast_crash_client") {
source_set("cast_crash_client") {
sources = [
"android/cast_crash_reporter_client_androic.cc",
"android/cast_crash_reporter_client_android.cc",
"android/cast_crash_reporter_client_android.h",
"linux/cast_crash_reporter_client.cc",
"linux/cast_crash_reporter_client.h",
]

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

deps = [
"//base",
"//chromecast/base",
"//chromecast/crash",
"//components/crash/app",
"//components/crash/app:lib",
"//content/public/common",
]

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

# TODO(kmackay) Consider renaming this.
test("cast_shell_unittests") {
sources = [
"linux/cast_crash_reporter_client_unittest.cc",
]

deps = [
":cast_crash_client",
"//base",
"//base/test:run_all_unittests",
"//base/test:test_support",
"//chromecast/crash",
"//testing/gtest",
]
}
15 changes: 8 additions & 7 deletions chromecast/base/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ source_set("base") {
"chromecast_switches.h",
"error_codes.cc",
"error_codes.h",
"metrics/cast_histograms.h",
"metrics/cast_metrics_helper.cc",
"metrics/cast_metrics_helper.h",
"metrics/grouped_histogram.cc",
"metrics/grouped_histogram.h",
"path_utils.cc",
"path_utils.h",
"process_utils.cc",
Expand All @@ -26,11 +21,15 @@ source_set("base") {
"serializers.h",
]

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

public_deps = [
"//chromecast/base/metrics",
]

deps = [
"//base",
]

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

test("cast_base_unittests") {
Expand All @@ -43,7 +42,9 @@ test("cast_base_unittests") {

deps = [
":base",
"//base",
"//base/test:run_all_unittests",
"//base/test:test_support",
"//testing/gtest",
]
}
Expand Down
13 changes: 8 additions & 5 deletions chromecast/base/metrics/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ source_set("metrics") {
"grouped_histogram.h",
]

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

deps = [
"//chromecast/base",
"//base",
]

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

source_set("test_support") {
Expand All @@ -26,9 +26,12 @@ source_set("test_support") {
"cast_metrics_test_helper.h",
]

deps = [
public_deps = [
":metrics",
"//chromecast/base",
]

deps = [
"//base",
]

configs += [ "//chromecast:config" ]
Expand Down
41 changes: 41 additions & 0 deletions chromecast/browser/metrics/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

source_set("metrics") {
sources = [
"cast_metrics_prefs.cc",
"cast_metrics_prefs.h",
"cast_metrics_service_client.cc",
"cast_metrics_service_client.h",
"cast_stability_metrics_provider.cc",
"cast_stability_metrics_provider.h",
"platform_metrics_providers.h",
]

deps = [
"//base",
"//base:i18n",
"//base:prefs",
"//chromecast/base",
"//chromecast/common",
"//components/metrics",
"//components/metrics:gpu",
"//components/metrics:net",
"//components/metrics:profiler",
"//content/public/common",
"//content/public/browser",
]

if (is_linux) {
sources += [
"external_metrics.cc",
"external_metrics.h",
]

deps += [ "//components/metrics:serialization" ]
}

# TODO(kmackay) add source "platform_metrics_providers_simple.cc"
# according to condition (chromecast_branding != "Chrome")
}
27 changes: 27 additions & 0 deletions chromecast/common/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

source_set("common") {
sources = [
"cast_content_client.cc",
"cast_content_client.h",
"cast_resource_delegate.cc",
"cast_resource_delegate.h",
"global_descriptors.h",
"platform_client_auth.h",
"pref_names.cc",
"pref_names.h",
]

# TODO(kmackay) Add "platform_client_auth._simple.cc" to sources
# if chromecast_branding != "Chrome"

deps = [
"//base",
"//chromecast/base:cast_version",
"//content/public/common",
"//ui/base",
"//ui/gfx",
]
}
7 changes: 5 additions & 2 deletions chromecast/crash/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@ source_set("crash") {
"linux/synchronized_minidump_manager.h",
]

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

deps = [
"//base",
"//breakpad:client",
"//chromecast/base",
"//chromecast/base:cast_version",
]

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

test("cast_crash_unittests") {
Expand All @@ -46,7 +47,9 @@ test("cast_crash_unittests") {

deps = [
":crash",
"//base",
"//base/test:run_all_unittests",
"//base/test:test_support",
"//breakpad:client",
"//testing/gmock",
"//testing/gtest",
Expand Down
7 changes: 4 additions & 3 deletions chromecast/media/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ group("media") {

test("cast_media_unittests") {
sources = [
"//media/base",
"cma/backend/audio_video_pipeline_device_unittest.cc",
"cma/base/balanced_media_task_runner_unittest.cc",
"cma/base/buffering_controller_unittest.cc",
Expand All @@ -40,17 +39,19 @@ test("cast_media_unittests") {
"cma/test/run_all_unittests.cc",
]

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

deps = [
":media",
"//base",
"//base:i18n",
"//base/test:test_support",
"//chromecast/base/metrics:test_support",
"//chromecast/public",
"//media",
"//media/base:test_support",
"//testing/gmock",
"//testing/gtest",
"//ui/gfx/geometry",
]

configs += [ "//chromecast:config" ]
}
26 changes: 24 additions & 2 deletions chromecast/media/base/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
import("//build/config/crypto.gni")
import("//chromecast/chromecast.gni")

declare_args() {
libcast_media_target = ""
}

source_set("base") {
sources = [
"decrypt_context.cc",
Expand All @@ -19,20 +23,38 @@ source_set("base") {
"switching_media_renderer.h",
]

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

deps = [
"//base",
"//crypto",
"//crypto:platform",
"//media",
"//third_party/widevine/cdm:version_h",
]

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

if (is_chromecast_chrome_branded) {
deps += [
"${libcast_media_target}",
# TODO(gyp): add dependency on internal/chromecast_internal:media_base_internal
]
} else {
sources += [ "key_systems_common_simple.cc" ]

deps += [ ":libcast_media_default" ]
}
}

shared_library("libcast_media_default") {
output_name = "libcast_media_1.0"

sources = [
"cast_media_default.cc",
]

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

deps = [
"//chromecast/public",
]
}
10 changes: 8 additions & 2 deletions chromecast/media/cma/base/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,21 @@ source_set("base") {
"decoder_buffer_adapter.h",
"decoder_buffer_base.cc",
"decoder_buffer_base.h",
"decoder_config_adapter.cc",
"decoder_config_adapter.h",
"media_task_runner.cc",
"media_task_runner.h",
"simple_media_task_runner.cc",
"simple_media_task_runner.h",
]

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

deps = [
"//base",
"//chromecast/base",
"//chromecast/base/metrics",
"//media",
"//media:shared_memory_support",
]

configs += [ "//chromecast:config" ]
}
11 changes: 9 additions & 2 deletions chromecast/media/cma/filters/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,20 @@ source_set("filters") {
"cma_renderer.h",
"demuxer_stream_adapter.cc",
"demuxer_stream_adapter.h",
"hole_frame_factory.cc",
"hole_frame_factory.h",
]

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

deps = [
"//base",
"//chromecast/base",
"//chromecast/media/cma/base",
"//chromecast/media/cma/pipeline",
"//gpu/command_buffer/client:gles2_interface",
"//gpu/command_buffer/common",
"//media",
"//ui/gfx/geometry",
]

configs += [ "//chromecast:config" ]
}
5 changes: 3 additions & 2 deletions chromecast/media/cma/ipc/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ source_set("ipc") {
"media_message_type.h",
]

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

deps = [
"//base",
"//chromecast/media/cma/base",
]

configs += [ "//chromecast:config" ]
}
6 changes: 4 additions & 2 deletions chromecast/media/cma/ipc_streamer/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ source_set("ipc_streamer") {
"video_decoder_config_marshaller.h",
]

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

deps = [
"//base",
"//chromecast/media/cma/base",
"//chromecast/media/cma/ipc",
"//media",
"//ui/gfx/geometry",
]

configs += [ "//chromecast:config" ]
}
19 changes: 19 additions & 0 deletions chromecast/public/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

source_set("public") {
sources = [
"cast_egl_platform.h",
"cast_egl_platform_shlib.h",
"cast_media_shlib.h",
"cast_sys_info.h",
"chromecast_export.h",
"graphics_properties_shlib.h",
"graphics_types.h",
"osd_plane.h",
"osd_plane_shlib.h",
"osd_surface.h",
"video_plane.h",
]
}

0 comments on commit f55d90e

Please sign in to comment.