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%': 'public',
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_media_shlib.h',
42 'public/cast_sys_info.h',
43 'public/chromecast_export.h',
44 'public/graphics_properties_shlib.h',
45 'public/graphics_types.h',
46 'public/media/decoder_config.h',
47 'public/media/stream_id.h',
49 'public/osd_plane_shlib.h',
50 'public/osd_surface.h',
51 'public/video_plane.h',
55 'target_name': 'cast_base',
56 'type': '<(component)',
58 '../base/base.gyp:base',
63 'base/chromecast_config_android.cc',
64 'base/chromecast_config_android.h',
65 'base/chromecast_switches.cc',
66 'base/chromecast_switches.h',
67 'base/error_codes.cc',
69 'base/metrics/cast_histograms.h',
70 'base/metrics/cast_metrics_helper.cc',
71 'base/metrics/cast_metrics_helper.h',
72 'base/metrics/grouped_histogram.cc',
73 'base/metrics/grouped_histogram.h',
76 'base/process_utils.cc',
77 'base/process_utils.h',
78 'base/serializers.cc',
88 }, # end of target 'cast_base'
90 'target_name': 'cast_crash',
91 'type': '<(component)',
93 # TODO(gfhuang): we should not need to include this directly, but
94 # somehow depending on component.gyp:breakpad_component is not
95 # working as expected.
100 'cast_version_header',
101 '../breakpad/breakpad.gyp:breakpad_client',
104 'crash/app_state_tracker.cc',
105 'crash/app_state_tracker.h',
106 'crash/cast_crash_keys.cc',
107 'crash/cast_crash_keys.h',
108 'crash/cast_crashdump_uploader.cc',
109 'crash/cast_crashdump_uploader.h',
110 'crash/linux/crash_util.cc',
111 'crash/linux/crash_util.h',
112 'crash/linux/dummy_minidump_generator.cc',
113 'crash/linux/dummy_minidump_generator.h',
114 'crash/linux/dump_info.cc',
115 'crash/linux/dump_info.h',
116 'crash/linux/minidump_generator.h',
117 'crash/linux/synchronized_minidump_manager.cc',
118 'crash/linux/synchronized_minidump_manager.h',
119 'crash/linux/minidump_params.cc',
120 'crash/linux/minidump_params.h',
121 'crash/linux/minidump_writer.cc',
122 'crash/linux/minidump_writer.h',
124 }, # end of target 'cast_crash'
126 'target_name': 'cast_crash_client',
127 'type': '<(component)',
130 '../breakpad/breakpad.gyp:breakpad_client',
131 '../components/components.gyp:crash_component',
132 '../content/content.gyp:content_common',
138 'app/android/crash_handler.cc',
139 'app/android/crash_handler.h',
140 'app/android/cast_crash_reporter_client_android.cc',
141 'app/android/cast_crash_reporter_client_android.h',
142 'app/linux/cast_crash_reporter_client.cc',
143 'app/linux/cast_crash_reporter_client.h',
152 }, # end of target 'cast_crash_client'
154 'target_name': 'cast_net',
155 'type': '<(component)',
157 'net/connectivity_checker.cc',
158 'net/connectivity_checker.h',
159 'net/connectivity_checker_impl.cc',
160 'net/connectivity_checker_impl.h',
161 'net/fake_connectivity_checker.cc',
162 'net/fake_connectivity_checker.h',
163 'net/net_switches.cc',
164 'net/net_switches.h',
165 'net/net_util_cast.cc',
166 'net/net_util_cast.h',
171 'net/network_change_notifier_factory_cast.cc',
172 'net/network_change_notifier_factory_cast.h',
178 'target_name': 'cast_shell_resources',
181 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chromecast',
185 'action_name': 'cast_shell_resources',
187 'grit_grd_file': 'app/resources/shell_resources.grd',
188 'grit_resource_ids': 'app/resources/resource_ids',
190 'includes': [ '../build/grit_action.gypi' ],
193 'includes': [ '../build/grit_target.gypi' ],
196 'target_name': 'cast_shell_pak',
199 'cast_shell_resources',
200 '../content/app/resources/content_resources.gyp:content_resources',
201 '../content/app/strings/content_strings.gyp:content_strings',
202 '../net/net.gyp:net_resources',
203 '../third_party/WebKit/public/blink_resources.gyp:blink_resources',
204 '../ui/resources/ui_resources.gyp:ui_resources',
205 '../ui/strings/ui_strings.gyp:ui_strings',
209 'action_name': 'repack_cast_shell_pak',
212 '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_resources.pak',
213 '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_image_resources_100_percent.pak',
214 '<(SHARED_INTERMEDIATE_DIR)/chromecast/shell_resources.pak',
215 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
216 '<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_100_percent.pak',
217 '<(SHARED_INTERMEDIATE_DIR)/content/app/strings/content_strings_en-US.pak',
218 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
219 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percent.pak',
220 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/webui_resources.pak',
221 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/app_locale_settings_en-US.pak',
222 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/ui_strings_en-US.pak',
225 ['chromecast_branding!="public" and use_chromecast_webui==1', {
227 '<(SHARED_INTERMEDIATE_DIR)/chromecast/app_resources.pak',
228 '<(SHARED_INTERMEDIATE_DIR)/chromecast/cast_webui_resources.pak',
232 'pak_output': '<(PRODUCT_DIR)/assets/cast_shell.pak',
234 'includes': [ '../build/repack_action.gypi' ],
238 ['chromecast_branding!="public" and use_chromecast_webui==1', {
240 'internal/chromecast_resources.gyp:chromecast_app_resources',
241 'internal/chromecast_resources.gyp:chromecast_webui_resources',
245 }, # end of target 'cast_shell_pak'
246 # This target contains all content-embedder implementation that is
247 # non-platform-specific.
249 'target_name': 'cast_shell_common',
250 'type': '<(component)',
256 'cast_shell_resources',
258 'cast_version_header',
259 'chromecast_locales.gyp:chromecast_locales_pak',
260 'chromecast_locales.gyp:chromecast_settings',
261 'media/media.gyp:media_base',
262 'media/media.gyp:media_cdm',
263 '../base/base.gyp:base',
264 '../components/components.gyp:breakpad_host',
265 '../components/components.gyp:cdm_renderer',
266 '../components/components.gyp:component_metrics_proto',
267 '../components/components.gyp:crash_component',
268 '../components/components.gyp:devtools_discovery',
269 '../components/components.gyp:devtools_http_handler',
270 '../components/components.gyp:network_hints_browser',
271 '../components/components.gyp:network_hints_renderer',
272 '../components/components.gyp:metrics',
273 '../components/components.gyp:metrics_gpu',
274 '../components/components.gyp:metrics_net',
275 '../components/components.gyp:metrics_profiler',
276 '../content/content.gyp:content',
277 '../content/content.gyp:content_app_both',
278 '../skia/skia.gyp:skia',
279 '../third_party/WebKit/public/blink.gyp:blink',
280 '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
283 'app/cast_main_delegate.cc',
284 'app/cast_main_delegate.h',
285 'browser/android/cast_window_android.cc',
286 'browser/android/cast_window_android.h',
287 'browser/android/cast_window_manager.cc',
288 'browser/android/cast_window_manager.h',
289 'browser/cast_browser_context.cc',
290 'browser/cast_browser_context.h',
291 'browser/cast_browser_main_parts.cc',
292 'browser/cast_browser_main_parts.h',
293 'browser/cast_browser_process.cc',
294 'browser/cast_browser_process.h',
295 'browser/cast_content_browser_client.cc',
296 'browser/cast_content_browser_client.h',
297 'browser/cast_content_window.cc',
298 'browser/cast_content_window.h',
299 'browser/cast_download_manager_delegate.cc',
300 'browser/cast_download_manager_delegate.h',
301 'browser/cast_http_user_agent_settings.cc',
302 'browser/cast_http_user_agent_settings.h',
303 'browser/cast_net_log.cc',
304 'browser/cast_net_log.h',
305 'browser/cast_network_delegate.cc',
306 'browser/cast_network_delegate.h',
307 'browser/cast_permission_manager.cc',
308 'browser/cast_permission_manager.h',
309 'browser/cast_quota_permission_context.cc',
310 'browser/cast_quota_permission_context.h',
311 'browser/cast_resource_dispatcher_host_delegate.cc',
312 'browser/cast_resource_dispatcher_host_delegate.h',
313 'browser/devtools/cast_dev_tools_delegate.cc',
314 'browser/devtools/cast_dev_tools_delegate.h',
315 'browser/devtools/remote_debugging_server.cc',
316 'browser/devtools/remote_debugging_server.h',
317 'browser/geolocation/cast_access_token_store.cc',
318 'browser/geolocation/cast_access_token_store.h',
319 'browser/media/cast_media_client_android.cc',
320 'browser/media/cast_media_client_android.h',
321 'browser/metrics/cast_metrics_prefs.cc',
322 'browser/metrics/cast_metrics_prefs.h',
323 'browser/metrics/cast_metrics_service_client.cc',
324 'browser/metrics/cast_metrics_service_client.h',
325 'browser/metrics/cast_stability_metrics_provider.cc',
326 'browser/metrics/cast_stability_metrics_provider.h',
327 'browser/metrics/platform_metrics_providers.h',
328 'browser/pref_service_helper.cc',
329 'browser/pref_service_helper.h',
330 'browser/service/cast_service.cc',
331 'browser/service/cast_service.h',
332 'browser/url_request_context_factory.cc',
333 'browser/url_request_context_factory.h',
334 'common/cast_content_client.cc',
335 'common/cast_content_client.h',
336 'common/cast_resource_delegate.cc',
337 'common/cast_resource_delegate.h',
338 'common/media/cast_messages.h',
339 'common/media/cast_message_generator.cc',
340 'common/media/cast_message_generator.h',
341 'common/platform_client_auth.h',
342 'common/pref_names.cc',
343 'common/pref_names.h',
344 'renderer/cast_content_renderer_client.cc',
345 'renderer/cast_content_renderer_client.h',
346 'renderer/cast_media_load_deferrer.cc',
347 'renderer/cast_media_load_deferrer.h',
348 'renderer/cast_render_process_observer.cc',
349 'renderer/cast_render_process_observer.h',
350 'renderer/key_systems_cast.cc',
351 'renderer/key_systems_cast.h',
352 'renderer/media/capabilities_message_filter.cc',
353 'renderer/media/capabilities_message_filter.h',
356 ['chromecast_branding!="public"', {
358 'internal/chromecast_internal.gyp:cast_shell_internal',
362 'browser/cast_content_browser_client_simple.cc',
363 'browser/cast_network_delegate_simple.cc',
364 'browser/devtools/remote_debugging_server_simple.cc',
365 'browser/metrics/platform_metrics_providers_simple.cc',
366 'browser/pref_service_helper_simple.cc',
367 'browser/service/cast_service_android.cc',
368 'browser/service/cast_service_android.h',
369 'common/platform_client_auth_simple.cc',
370 'renderer/cast_content_renderer_client_simple.cc',
375 'browser/media/cast_browser_cdm_factory_simple.cc',
376 'browser/service/cast_service_simple.cc',
377 'browser/service/cast_service_simple.h',
382 # ExternalMetrics not necessary on Android and (as of this writing) uses
383 # non-portable filesystem operations. Also webcrypto is not used on
387 'browser/metrics/external_metrics.cc',
388 'browser/metrics/external_metrics.h',
389 'graphics/cast_screen.cc',
390 'graphics/cast_screen.h',
393 '../components/components.gyp:metrics_serialization',
398 '../components/components.gyp:cdm_browser',
405 'target_name': 'cast_sys_info',
406 'type': '<(component)',
409 '../base/base.gyp:base',
412 'base/cast_sys_info_util.h',
413 'base/cast_sys_info_dummy.cc',
414 'base/cast_sys_info_dummy.h',
415 'base/cast_sys_info_android.cc',
416 'base/cast_sys_info_android.h',
424 ['chromecast_branding=="public" and OS!="android"', {
426 'base/cast_sys_info_util_simple.cc',
430 }, # end of target 'cast_sys_info'
432 'target_name': 'cast_version_header',
434 'direct_dependent_settings': {
436 '<(SHARED_INTERMEDIATE_DIR)',
441 'action_name': 'version_header',
442 'message': 'Generating version header file: <@(_outputs)',
448 '<(SHARED_INTERMEDIATE_DIR)/chromecast/base/version.h',
452 '<(version_py_path)',
453 '-e', 'VERSION_FULL="<(version_full)"',
454 # CAST_BUILD_INCREMENTAL is taken from buildbot if available;
455 # otherwise, a dev string is used.
456 '-e', 'CAST_BUILD_INCREMENTAL="<!(echo ${CAST_BUILD_INCREMENTAL:="<!(date +%Y%m%d.%H%M%S)"})"',
457 # CAST_BUILD_RELEASE is taken from cast_build_release file if exist;
458 # otherwise, a dev string is used.
459 '-e', 'CAST_BUILD_RELEASE="<!(if test -f <(cast_build_release); then cat <(cast_build_release); else echo eng.${USER}; fi)"',
460 '-e', 'CAST_IS_DEBUG_BUILD=1 if "<(CONFIGURATION_NAME)" == "Debug" or <(cast_is_debug_build) == 1 else 0',
461 '-e', 'CAST_PRODUCT_TYPE=<(cast_product_type)',
466 '../build/util/version.gypi',
473 # Targets for Android receiver.
478 'target_name': 'cast_shell_icudata',
481 '../third_party/icu/icu.gyp:icudata',
482 '../v8/tools/gyp/v8.gyp:v8_external_snapshot',
485 'destination': '<(PRODUCT_DIR)/assets',
487 '<(PRODUCT_DIR)/icudtl.dat',
488 '<(PRODUCT_DIR)/natives_blob.bin',
489 '<(PRODUCT_DIR)/snapshot_blob.bin',
494 'target_name': 'libcast_shell_android',
495 'type': 'shared_library',
499 'cast_shell_icudata',
501 'cast_version_header',
502 '../base/base.gyp:base',
503 '../components/components.gyp:breakpad_host',
504 '../components/components.gyp:external_video_surface',
505 '../content/content.gyp:content',
506 '../skia/skia.gyp:skia',
507 '../ui/gfx/gfx.gyp:gfx',
508 '../ui/gl/gl.gyp:gl',
511 'android/cast_jni_registrar.cc',
512 'android/cast_jni_registrar.h',
513 'android/cast_metrics_helper_android.cc',
514 'android/cast_metrics_helper_android.h',
515 'android/platform_jni_loader.h',
516 'app/android/cast_jni_loader.cc',
519 ['chromecast_branding!="public"', {
521 'internal/chromecast_internal.gyp:cast_shell_android_internal'
525 'android/platform_jni_loader_stub.cc',
529 }, # end of target 'libcast_shell_android'
531 'target_name': 'cast_base_java',
534 '../base/base.gyp:base_java',
537 'android_manifest_path': 'android/AndroidManifest.xml',
538 'java_in_dir': 'base/java',
540 'includes': ['../build/java.gypi'],
541 }, # end of target 'cast_base_java'
543 'target_name': 'cast_shell_java',
546 '<(android_support_v13_target)',
548 'cast_shell_manifest',
549 '../base/base.gyp:base_java',
550 '../components/components.gyp:external_video_surface_java',
551 '../content/content.gyp:content_java',
552 '../media/media.gyp:media_java',
553 '../net/net.gyp:net_java',
554 '../ui/android/ui_android.gyp:ui_java',
557 'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
558 'has_java_resources': 1,
559 'java_in_dir': 'browser/android/apk',
560 'resource_dir': 'browser/android/apk/res',
561 'R_package': 'org.chromium.chromecast.shell',
563 'includes': ['../build/java.gypi'],
564 }, # end of target 'cast_shell_java'
566 'target_name': 'cast_shell_manifest',
569 'jinja_inputs': ['browser/android/apk/AndroidManifest.xml.jinja2'],
570 'jinja_output': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
572 'includes': [ '../build/android/jinja_template.gypi' ],
575 'target_name': 'cast_shell_apk',
579 'libcast_shell_android',
582 'apk_name': 'CastShell',
583 'manifest_package_name': 'org.chromium.chromecast.shell',
584 # Note(gunsch): there are no Java files in the android/ directory.
585 # Unfortunately, the java_apk.gypi target rigidly insists on having
586 # a java_in_dir directory, but complains about duplicate classes
587 # from the common cast_shell_java target (shared with internal APK)
588 # if the actual Java path is used.
589 # This will hopefully be removable after the great GN migration.
590 'java_in_dir': 'android',
591 'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
592 'package_name': 'org.chromium.chromecast.shell',
593 'native_lib_target': 'libcast_shell_android',
594 'asset_location': '<(PRODUCT_DIR)/assets',
595 'additional_input_paths': ['<(PRODUCT_DIR)/assets/cast_shell.pak'],
597 'includes': [ '../build/java_apk.gypi' ],
600 'target_name': 'cast_jni_headers',
603 'base/java/src/org/chromium/chromecast/base/ChromecastConfigAndroid.java',
604 'browser/android/apk/src/org/chromium/chromecast/shell/CastCrashHandler.java',
605 'browser/android/apk/src/org/chromium/chromecast/shell/CastMetricsHelper.java',
606 'browser/android/apk/src/org/chromium/chromecast/shell/CastSysInfoAndroid.java',
607 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java',
608 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowManager.java',
610 'direct_dependent_settings': {
612 '<(SHARED_INTERMEDIATE_DIR)/chromecast',
616 'jni_gen_package': 'chromecast',
618 'includes': [ '../build/jni_generator.gypi' ],
621 }, { # OS != "android"
624 'target_name': 'cast_shell_media',
625 'type': '<(component)',
627 'media/media.gyp:cast_media',
628 '../content/content.gyp:content',
629 '../ipc/ipc.gyp:ipc',
630 '../media/media.gyp:media',
633 'browser/media/cast_browser_cdm_factory.cc',
634 'browser/media/cast_browser_cdm_factory.h',
635 'browser/media/cma_message_filter_host.cc',
636 'browser/media/cma_message_filter_host.h',
637 'browser/media/media_pipeline_host.cc',
638 'browser/media/media_pipeline_host.h',
639 'common/media/cma_ipc_common.h',
640 'common/media/cma_messages.h',
641 'common/media/cma_message_generator.cc',
642 'common/media/cma_message_generator.h',
643 'common/media/cma_param_traits.cc',
644 'common/media/cma_param_traits.h',
645 'common/media/shared_memory_chunk.cc',
646 'common/media/shared_memory_chunk.h',
647 'renderer/media/audio_pipeline_proxy.cc',
648 'renderer/media/audio_pipeline_proxy.h',
649 'renderer/media/chromecast_media_renderer_factory.cc',
650 'renderer/media/chromecast_media_renderer_factory.h',
651 'renderer/media/cma_message_filter_proxy.cc',
652 'renderer/media/cma_message_filter_proxy.h',
653 'renderer/media/media_channel_proxy.cc',
654 'renderer/media/media_channel_proxy.h',
655 'renderer/media/media_pipeline_proxy.cc',
656 'renderer/media/media_pipeline_proxy.h',
657 'renderer/media/video_pipeline_proxy.cc',
658 'renderer/media/video_pipeline_proxy.h',
660 }, # end of target 'cast_shell_media'
661 # This target contains all of the primary code of |cast_shell|, except
662 # for |main|. This allows end-to-end tests using |cast_shell|.
663 # This also includes all targets that cannot be built on Android.
665 'target_name': 'cast_shell_core',
666 'type': '<(component)',
670 'media/media.gyp:cast_media',
673 ['ozone_platform_egltest==1', {
675 '../ui/ozone/ozone.gyp:eglplatform_shim_x11',
681 'target_name': 'cast_shell',
682 'type': 'executable',
690 # Allow OEMs to override default libraries that are shipped with
691 # cast receiver package by installed OEM-specific libraries in
693 '-Wl,-rpath=/oem_cast_shlib',
694 # TODO(dougsteed): remove when Chromecast moves to boringssl.
695 # Allow the cast shell to find the NSS module in the same
697 '-Wl,-rpath=\$$ORIGIN'
702 ['enable_default_cast_graphics==1', {
705 'target_name': 'libcast_graphics_1.0',
706 'type': 'shared_library',
711 'graphics/cast_egl_platform_default.cc',
712 'graphics/graphics_properties_default.cc',
713 'graphics/osd_plane_default.cc'
718 ], # end of conditions