1 # Copyright 2014 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.
7 'android_support_v13_target%':
8 '../third_party/android_tools/android_tools.gyp:android_support_v13_javalib',
9 'cast_build_release': 'internal/build/cast_build_release',
10 'cast_is_debug_build%': 0,
11 # Refers to enum CastProductType in components/metrics/proto/cast_logs.proto
12 'cast_product_type%': 0, # CAST_PRODUCT_TYPE_UNKNOWN
14 'chromecast_branding%': 'Chromium',
15 'disable_display%': 0,
16 'enable_default_cast_graphics%': 1,
17 'ozone_platform_cast%': 0,
18 'use_chromecast_webui%': 0,
21 'chromecast_tests.gypi',
25 '..', # Root of Chromium checkout
28 ['disable_display==1', {
29 'defines': ['DISABLE_DISPLAY'],
34 # Public API target for OEM partners to replace shlibs.
36 'target_name': 'cast_public_api',
37 'type': '<(component)',
39 'public/cast_egl_platform.h',
40 'public/cast_egl_platform_shlib.h',
41 'public/cast_sys_info.h',
42 'public/chromecast_export.h',
43 'public/graphics_properties_shlib.h',
44 'public/graphics_types.h',
46 'public/osd_plane_shlib.h',
47 'public/osd_surface.h',
50 # TODO(gunsch): Remove this fake target once it's either added or no
51 # longer referenced from internal code.
52 {'target_name': 'cast_media_audio', 'type': 'none'},
55 'target_name': 'cast_base',
56 'type': '<(component)',
58 '../base/base.gyp:base',
63 'base/metrics/cast_histograms.h',
64 'base/metrics/cast_metrics_helper.cc',
65 'base/metrics/cast_metrics_helper.h',
66 'base/metrics/grouped_histogram.cc',
67 'base/metrics/grouped_histogram.h',
68 'base/serializers.cc',
71 }, # end of target 'cast_base'
73 'target_name': 'cast_crash_client',
74 'type': '<(component)',
76 '../breakpad/breakpad.gyp:breakpad_client',
77 '../components/components.gyp:crash_component',
80 'crash/cast_crash_keys.cc',
81 'crash/cast_crash_keys.h',
82 'crash/cast_crash_reporter_client.cc',
83 'crash/cast_crash_reporter_client.h',
86 ['chromecast_branding=="Chrome"', {
88 'internal/chromecast_internal.gyp:crash_internal',
92 'crash/cast_crash_reporter_client_simple.cc',
96 }, # end of target 'cast_crash_client'
98 'target_name': 'cast_net',
99 'type': '<(component)',
101 'net/connectivity_checker.cc',
102 'net/connectivity_checker.h',
103 'net/net_switches.cc',
104 'net/net_switches.h',
108 'target_name': 'cast_shell_resources',
111 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chromecast',
115 'action_name': 'cast_shell_resources',
117 'grit_grd_file': 'app/resources/shell_resources.grd',
118 'grit_resource_ids': 'app/resources/resource_ids',
120 'includes': [ '../build/grit_action.gypi' ],
123 'includes': [ '../build/grit_target.gypi' ],
126 'target_name': 'cast_shell_pak',
129 'cast_shell_resources',
130 '../content/app/resources/content_resources.gyp:content_resources',
131 '../content/app/strings/content_strings.gyp:content_strings',
132 '../net/net.gyp:net_resources',
133 '../third_party/WebKit/public/blink_resources.gyp:blink_resources',
134 '../ui/resources/ui_resources.gyp:ui_resources',
135 '../ui/strings/ui_strings.gyp:ui_strings',
139 'action_name': 'repack_cast_shell_pak',
142 '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_resources.pak',
143 '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_image_resources_100_percent.pak',
144 '<(SHARED_INTERMEDIATE_DIR)/chromecast/shell_resources.pak',
145 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
146 '<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_100_percent.pak',
147 '<(SHARED_INTERMEDIATE_DIR)/content/app/strings/content_strings_en-US.pak',
148 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
149 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percent.pak',
150 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/webui_resources.pak',
151 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/app_locale_settings_en-US.pak',
152 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/ui_strings_en-US.pak',
155 ['chromecast_branding=="Chrome" and use_chromecast_webui==1', {
157 '<(SHARED_INTERMEDIATE_DIR)/chromecast/app_resources.pak',
158 '<(SHARED_INTERMEDIATE_DIR)/chromecast/cast_webui_resources.pak',
162 'pak_output': '<(PRODUCT_DIR)/assets/cast_shell.pak',
164 'includes': [ '../build/repack_action.gypi' ],
168 ['chromecast_branding=="Chrome" and use_chromecast_webui==1', {
170 'internal/chromecast_resources.gyp:chromecast_app_resources',
171 'internal/chromecast_resources.gyp:chromecast_webui_resources',
175 }, # end of target 'cast_shell_pak'
176 # This target contains all content-embedder implementation that is
177 # non-platform-specific.
179 'target_name': 'cast_shell_common',
180 'type': '<(component)',
186 'cast_shell_resources',
188 'cast_version_header',
189 'chromecast_locales.gyp:chromecast_locales_pak',
190 'chromecast_locales.gyp:chromecast_settings',
191 'media/media.gyp:media_base',
192 'media/media.gyp:media_cdm',
193 '../base/base.gyp:base',
194 '../components/components.gyp:breakpad_host',
195 '../components/components.gyp:cdm_renderer',
196 '../components/components.gyp:component_metrics_proto',
197 '../components/components.gyp:crash_component',
198 '../components/components.gyp:devtools_discovery',
199 '../components/components.gyp:devtools_http_handler',
200 '../components/components.gyp:network_hints_browser',
201 '../components/components.gyp:network_hints_renderer',
202 '../components/components.gyp:metrics',
203 '../components/components.gyp:metrics_gpu',
204 '../components/components.gyp:metrics_net',
205 '../components/components.gyp:metrics_profiler',
206 '../content/content.gyp:content',
207 '../content/content.gyp:content_app_both',
208 '../skia/skia.gyp:skia',
209 '../third_party/WebKit/public/blink.gyp:blink',
210 '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
213 'app/cast_main_delegate.cc',
214 'app/cast_main_delegate.h',
215 'browser/cast_browser_context.cc',
216 'browser/cast_browser_context.h',
217 'browser/cast_browser_main_parts.cc',
218 'browser/cast_browser_main_parts.h',
219 'browser/cast_browser_process.cc',
220 'browser/cast_browser_process.h',
221 'browser/cast_content_browser_client.cc',
222 'browser/cast_content_browser_client.h',
223 'browser/cast_content_window.cc',
224 'browser/cast_content_window.h',
225 'browser/cast_download_manager_delegate.cc',
226 'browser/cast_download_manager_delegate.h',
227 'browser/cast_http_user_agent_settings.cc',
228 'browser/cast_http_user_agent_settings.h',
229 'browser/cast_network_delegate.cc',
230 'browser/cast_network_delegate.h',
231 'browser/cast_permission_manager.cc',
232 'browser/cast_permission_manager.h',
233 'browser/cast_quota_permission_context.cc',
234 'browser/cast_quota_permission_context.h',
235 'browser/cast_resource_dispatcher_host_delegate.cc',
236 'browser/cast_resource_dispatcher_host_delegate.h',
237 'browser/devtools/cast_dev_tools_delegate.cc',
238 'browser/devtools/cast_dev_tools_delegate.h',
239 'browser/devtools/remote_debugging_server.cc',
240 'browser/devtools/remote_debugging_server.h',
241 'browser/geolocation/cast_access_token_store.cc',
242 'browser/geolocation/cast_access_token_store.h',
243 'browser/media/cast_media_client_android.cc',
244 'browser/media/cast_media_client_android.h',
245 'browser/metrics/cast_metrics_prefs.cc',
246 'browser/metrics/cast_metrics_prefs.h',
247 'browser/metrics/cast_metrics_service_client.cc',
248 'browser/metrics/cast_metrics_service_client.h',
249 'browser/metrics/cast_stability_metrics_provider.cc',
250 'browser/metrics/cast_stability_metrics_provider.h',
251 'browser/metrics/platform_metrics_providers.h',
252 'browser/pref_service_helper.cc',
253 'browser/pref_service_helper.h',
254 'browser/service/cast_service.cc',
255 'browser/service/cast_service.h',
256 'browser/url_request_context_factory.cc',
257 'browser/url_request_context_factory.h',
258 'common/cast_content_client.cc',
259 'common/cast_content_client.h',
260 'common/cast_resource_delegate.cc',
261 'common/cast_resource_delegate.h',
262 'common/chromecast_switches.cc',
263 'common/chromecast_switches.h',
264 'common/media/cast_messages.h',
265 'common/media/cast_message_generator.cc',
266 'common/media/cast_message_generator.h',
267 'common/platform_client_auth.h',
268 'common/pref_names.cc',
269 'common/pref_names.h',
270 'renderer/cast_content_renderer_client.cc',
271 'renderer/cast_content_renderer_client.h',
272 'renderer/cast_media_load_deferrer.cc',
273 'renderer/cast_media_load_deferrer.h',
274 'renderer/cast_render_process_observer.cc',
275 'renderer/cast_render_process_observer.h',
276 'renderer/key_systems_cast.cc',
277 'renderer/key_systems_cast.h',
278 'renderer/media/capabilities_message_filter.cc',
279 'renderer/media/capabilities_message_filter.h',
282 ['chromecast_branding=="Chrome"', {
284 'internal/chromecast_internal.gyp:cast_shell_internal',
288 'browser/cast_content_browser_client_simple.cc',
289 'browser/cast_network_delegate_simple.cc',
290 'browser/devtools/remote_debugging_server_simple.cc',
291 'browser/metrics/platform_metrics_providers_simple.cc',
292 'browser/pref_service_helper_simple.cc',
293 'common/platform_client_auth_simple.cc',
294 'renderer/cast_content_renderer_client_simple.cc',
295 'renderer/key_systems_cast_simple.cc',
300 'browser/service/cast_service_android.cc',
301 'browser/service/cast_service_android.h',
305 'browser/media/cast_browser_cdm_factory_simple.cc',
306 'browser/service/cast_service_simple.cc',
307 'browser/service/cast_service_simple.h',
312 # ExternalMetrics not necessary on Android and (as of this writing) uses
313 # non-portable filesystem operations. Also webcrypto is not used on
317 'browser/metrics/external_metrics.cc',
318 'browser/metrics/external_metrics.h',
321 '../components/components.gyp:metrics_serialization',
322 '../ui/aura/aura.gyp:aura_test_support',
327 '../components/components.gyp:cdm_browser',
333 'target_name': 'cast_sys_info',
334 'type': '<(component)',
337 '../base/base.gyp:base',
340 'base/cast_sys_info_util.h',
341 'base/cast_sys_info_dummy.cc',
342 'base/cast_sys_info_dummy.h',
345 ['chromecast_branding!="Chrome"', {
347 'base/cast_sys_info_util_simple.cc',
351 }, # end of target 'cast_sys_info'
353 'target_name': 'cast_version_header',
355 'direct_dependent_settings': {
357 '<(SHARED_INTERMEDIATE_DIR)',
362 'action_name': 'version_header',
363 'message': 'Generating version header file: <@(_outputs)',
366 'common/version.h.in',
369 '<(SHARED_INTERMEDIATE_DIR)/chromecast/common/version.h',
373 '<(version_py_path)',
374 '-e', 'VERSION_FULL="<(version_full)"',
375 # CAST_BUILD_INCREMENTAL is taken from buildbot if available;
376 # otherwise, a dev string is used.
377 '-e', 'CAST_BUILD_INCREMENTAL="<!(echo ${CAST_BUILD_INCREMENTAL:="<!(date +%Y%m%d.%H%M%S)"})"',
378 # CAST_BUILD_RELEASE is taken from cast_build_release file if exist;
379 # otherwise, a dev string is used.
380 '-e', 'CAST_BUILD_RELEASE="<!(if test -f <(cast_build_release); then cat <(cast_build_release); else echo eng.${USER}; fi)"',
381 '-e', 'CAST_IS_DEBUG_BUILD=1 if "<(CONFIGURATION_NAME)" == "Debug" or <(cast_is_debug_build) == 1 else 0',
382 '-e', 'CAST_PRODUCT_TYPE=<(cast_product_type)',
383 'common/version.h.in',
387 '../build/util/version.gypi',
394 # Targets for Android receiver.
399 'target_name': 'cast_shell_icudata',
402 '../third_party/icu/icu.gyp:icudata',
403 '../v8/tools/gyp/v8.gyp:v8_external_snapshot',
406 'destination': '<(PRODUCT_DIR)/assets',
408 '<(PRODUCT_DIR)/icudtl.dat',
409 '<(PRODUCT_DIR)/natives_blob.bin',
410 '<(PRODUCT_DIR)/snapshot_blob.bin',
415 'target_name': 'libcast_shell_android',
416 'type': 'shared_library',
420 'cast_shell_icudata',
422 'cast_version_header',
423 '../base/base.gyp:base',
424 '../breakpad/breakpad.gyp:breakpad_client',
425 '../components/components.gyp:breakpad_host',
426 '../components/components.gyp:crash_component',
427 '../content/content.gyp:content',
428 '../skia/skia.gyp:skia',
429 '../ui/gfx/gfx.gyp:gfx',
430 '../ui/gl/gl.gyp:gl',
436 'android/cast_jni_registrar.cc',
437 'android/cast_jni_registrar.h',
438 'android/chromecast_config_android.cc',
439 'android/chromecast_config_android.h',
440 'android/platform_jni_loader.h',
441 'app/android/cast_jni_loader.cc',
442 'browser/android/cast_window_android.cc',
443 'browser/android/cast_window_android.h',
444 'browser/android/cast_window_manager.cc',
445 'browser/android/cast_window_manager.h',
446 'browser/android/external_video_surface_container_impl.cc',
447 'browser/android/external_video_surface_container_impl.h',
448 'crash/android/cast_crash_reporter_client_android.cc',
449 'crash/android/cast_crash_reporter_client_android.h',
450 'crash/android/crash_handler.cc',
451 'crash/android/crash_handler.h',
454 ['chromecast_branding=="Chrome"', {
456 'internal/chromecast_internal.gyp:cast_shell_android_internal'
460 'android/chromecast_config_android_stub.cc',
461 'android/platform_jni_loader_stub.cc',
465 }, # end of target 'libcast_shell_android'
467 'target_name': 'cast_shell_java',
470 '<(android_support_v13_target)',
471 '../base/base.gyp:base_java',
472 '../content/content.gyp:content_java',
473 '../media/media.gyp:media_java',
474 '../net/net.gyp:net_java',
475 '../ui/android/ui_android.gyp:ui_java',
478 'has_java_resources': 1,
479 'java_in_dir': 'browser/android/apk',
480 'resource_dir': 'browser/android/apk/res',
481 'R_package': 'org.chromium.chromecast.shell',
483 'includes': ['../build/java.gypi'],
484 }, # end of target 'cast_shell_java'
486 'target_name': 'cast_shell_manifest',
489 'jinja_inputs': ['browser/android/apk/AndroidManifest.xml.jinja2'],
490 'jinja_output': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
492 'includes': [ '../build/android/jinja_template.gypi' ],
495 'target_name': 'cast_shell_apk',
499 'libcast_shell_android',
502 'apk_name': 'CastShell',
503 'manifest_package_name': 'org.chromium.chromecast.shell',
504 # Note(gunsch): there are no Java files in the android/ directory.
505 # Unfortunately, the java_apk.gypi target rigidly insists on having
506 # a java_in_dir directory, but complains about duplicate classes
507 # from the common cast_shell_java target (shared with internal APK)
508 # if the actual Java path is used.
509 # This will hopefully be removable after the great GN migration.
510 'java_in_dir': 'android',
511 'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
512 'package_name': 'org.chromium.chromecast.shell',
513 'native_lib_target': 'libcast_shell_android',
514 'asset_location': '<(PRODUCT_DIR)/assets',
515 'additional_input_paths': ['<(PRODUCT_DIR)/assets/cast_shell.pak'],
517 'includes': [ '../build/java_apk.gypi' ],
520 'target_name': 'cast_jni_headers',
523 'browser/android/apk/src/org/chromium/chromecast/shell/CastCrashHandler.java',
524 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java',
525 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowManager.java',
526 'browser/android/apk/src/org/chromium/chromecast/shell/ExternalVideoSurfaceContainer.java',
528 'direct_dependent_settings': {
530 '<(SHARED_INTERMEDIATE_DIR)/chromecast',
534 'jni_gen_package': 'chromecast',
536 'includes': [ '../build/jni_generator.gypi' ],
539 }, { # OS != "android"
542 'target_name': 'cast_shell_media',
543 'type': '<(component)',
545 'media/media.gyp:cast_media',
546 '../content/content.gyp:content',
547 '../ipc/ipc.gyp:ipc',
548 '../media/media.gyp:media',
551 'browser/media/cast_browser_cdm_factory.cc',
552 'browser/media/cast_browser_cdm_factory.h',
553 'browser/media/cma_message_filter_host.cc',
554 'browser/media/cma_message_filter_host.h',
555 'browser/media/cma_message_loop.cc',
556 'browser/media/cma_message_loop.h',
557 'browser/media/media_pipeline_host.cc',
558 'browser/media/media_pipeline_host.h',
559 'common/media/cma_ipc_common.h',
560 'common/media/cma_messages.h',
561 'common/media/cma_message_generator.cc',
562 'common/media/cma_message_generator.h',
563 'common/media/cma_param_traits.cc',
564 'common/media/cma_param_traits.h',
565 'common/media/shared_memory_chunk.cc',
566 'common/media/shared_memory_chunk.h',
567 'renderer/media/audio_pipeline_proxy.cc',
568 'renderer/media/audio_pipeline_proxy.h',
569 'renderer/media/chromecast_media_renderer_factory.cc',
570 'renderer/media/chromecast_media_renderer_factory.h',
571 'renderer/media/cma_message_filter_proxy.cc',
572 'renderer/media/cma_message_filter_proxy.h',
573 'renderer/media/media_channel_proxy.cc',
574 'renderer/media/media_channel_proxy.h',
575 'renderer/media/media_pipeline_proxy.cc',
576 'renderer/media/media_pipeline_proxy.h',
577 'renderer/media/video_pipeline_proxy.cc',
578 'renderer/media/video_pipeline_proxy.h',
580 }, # end of target 'cast_shell_media'
581 # This target contains all of the primary code of |cast_shell|, except
582 # for |main|. This allows end-to-end tests using |cast_shell|.
583 # This also includes all targets that cannot be built on Android.
585 'target_name': 'cast_shell_core',
586 'type': '<(component)',
590 'media/media.gyp:cast_media',
593 ['chromecast_branding!="Chrome"', {
595 '../ui/ozone/ozone.gyp:eglplatform_shim_x11',
601 'target_name': 'cast_shell',
602 'type': 'executable',
610 # Allow OEMs to override default libraries that are shipped with
611 # cast receiver package by installed OEM-specific libraries in
613 '-Wl,-rpath=/oem_cast_shlib',
614 # TODO(dougsteed): remove when Chromecast moves to boringssl.
615 # Allow the cast shell to find the NSS module in the same
617 '-Wl,-rpath=\$$ORIGIN'
622 ['enable_default_cast_graphics==1', {
625 'target_name': 'libcast_graphics_1.0',
626 'type': 'shared_library',
631 'graphics/cast_egl_platform_default.cc',
632 'graphics/graphics_properties_default.cc',
633 'graphics/osd_plane_default.cc'
638 ], # end of conditions