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_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_switches.cc',
64 'base/chromecast_switches.h',
65 'base/error_codes.cc',
67 'base/metrics/cast_histograms.h',
68 'base/metrics/cast_metrics_helper.cc',
69 'base/metrics/cast_metrics_helper.h',
70 'base/metrics/grouped_histogram.cc',
71 'base/metrics/grouped_histogram.h',
74 'base/process_utils.cc',
75 'base/process_utils.h',
76 'base/serializers.cc',
79 }, # end of target 'cast_base'
81 'target_name': 'cast_crash',
82 'type': '<(component)',
84 # TODO(gfhuang): we should not need to include this directly, but
85 # somehow depending on component.gyp:breakpad_component is not
86 # working as expected.
91 'cast_version_header',
92 '../breakpad/breakpad.gyp:breakpad_client',
95 'crash/app_state_tracker.cc',
96 'crash/app_state_tracker.h',
97 'crash/cast_crash_keys.cc',
98 'crash/cast_crash_keys.h',
99 'crash/cast_crashdump_uploader.cc',
100 'crash/cast_crashdump_uploader.h',
101 'crash/linux/crash_util.cc',
102 'crash/linux/crash_util.h',
103 'crash/linux/dummy_minidump_generator.cc',
104 'crash/linux/dummy_minidump_generator.h',
105 'crash/linux/dump_info.cc',
106 'crash/linux/dump_info.h',
107 'crash/linux/minidump_generator.h',
108 'crash/linux/synchronized_minidump_manager.cc',
109 'crash/linux/synchronized_minidump_manager.h',
110 'crash/linux/minidump_params.cc',
111 'crash/linux/minidump_params.h',
112 'crash/linux/minidump_writer.cc',
113 'crash/linux/minidump_writer.h',
115 }, # end of target 'cast_crash'
117 'target_name': 'cast_crash_client',
118 'type': '<(component)',
121 '../components/components.gyp:crash_component',
122 '../content/content.gyp:content_common',
125 # TODO(slan): Move android crash_client here as well.
126 'app/linux/cast_crash_reporter_client.cc',
127 'app/linux/cast_crash_reporter_client.h',
129 }, # end of target 'cast_crash_client'
131 'target_name': 'cast_net',
132 'type': '<(component)',
134 'net/connectivity_checker.cc',
135 'net/connectivity_checker.h',
136 'net/connectivity_checker_impl.cc',
137 'net/connectivity_checker_impl.h',
138 'net/fake_connectivity_checker.cc',
139 'net/fake_connectivity_checker.h',
140 'net/net_switches.cc',
141 'net/net_switches.h',
142 'net/net_util_cast.cc',
143 'net/net_util_cast.h',
148 'net/network_change_notifier_factory_cast.cc',
149 'net/network_change_notifier_factory_cast.h',
155 'target_name': 'cast_shell_resources',
158 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chromecast',
162 'action_name': 'cast_shell_resources',
164 'grit_grd_file': 'app/resources/shell_resources.grd',
165 'grit_resource_ids': 'app/resources/resource_ids',
167 'includes': [ '../build/grit_action.gypi' ],
170 'includes': [ '../build/grit_target.gypi' ],
173 'target_name': 'cast_shell_pak',
176 'cast_shell_resources',
177 '../content/app/resources/content_resources.gyp:content_resources',
178 '../content/app/strings/content_strings.gyp:content_strings',
179 '../net/net.gyp:net_resources',
180 '../third_party/WebKit/public/blink_resources.gyp:blink_resources',
181 '../ui/resources/ui_resources.gyp:ui_resources',
182 '../ui/strings/ui_strings.gyp:ui_strings',
186 'action_name': 'repack_cast_shell_pak',
189 '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_resources.pak',
190 '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_image_resources_100_percent.pak',
191 '<(SHARED_INTERMEDIATE_DIR)/chromecast/shell_resources.pak',
192 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
193 '<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_100_percent.pak',
194 '<(SHARED_INTERMEDIATE_DIR)/content/app/strings/content_strings_en-US.pak',
195 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
196 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percent.pak',
197 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/webui_resources.pak',
198 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/app_locale_settings_en-US.pak',
199 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/ui_strings_en-US.pak',
202 ['chromecast_branding=="Chrome" and use_chromecast_webui==1', {
204 '<(SHARED_INTERMEDIATE_DIR)/chromecast/app_resources.pak',
205 '<(SHARED_INTERMEDIATE_DIR)/chromecast/cast_webui_resources.pak',
209 'pak_output': '<(PRODUCT_DIR)/assets/cast_shell.pak',
211 'includes': [ '../build/repack_action.gypi' ],
215 ['chromecast_branding=="Chrome" and use_chromecast_webui==1', {
217 'internal/chromecast_resources.gyp:chromecast_app_resources',
218 'internal/chromecast_resources.gyp:chromecast_webui_resources',
222 }, # end of target 'cast_shell_pak'
223 # This target contains all content-embedder implementation that is
224 # non-platform-specific.
226 'target_name': 'cast_shell_common',
227 'type': '<(component)',
233 'cast_shell_resources',
235 'cast_version_header',
236 'chromecast_locales.gyp:chromecast_locales_pak',
237 'chromecast_locales.gyp:chromecast_settings',
238 'media/media.gyp:media_base',
239 'media/media.gyp:media_cdm',
240 '../base/base.gyp:base',
241 '../components/components.gyp:breakpad_host',
242 '../components/components.gyp:cdm_renderer',
243 '../components/components.gyp:component_metrics_proto',
244 '../components/components.gyp:crash_component',
245 '../components/components.gyp:devtools_discovery',
246 '../components/components.gyp:devtools_http_handler',
247 '../components/components.gyp:network_hints_browser',
248 '../components/components.gyp:network_hints_renderer',
249 '../components/components.gyp:metrics',
250 '../components/components.gyp:metrics_gpu',
251 '../components/components.gyp:metrics_net',
252 '../components/components.gyp:metrics_profiler',
253 '../content/content.gyp:content',
254 '../content/content.gyp:content_app_both',
255 '../skia/skia.gyp:skia',
256 '../third_party/WebKit/public/blink.gyp:blink',
257 '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
260 'app/cast_main_delegate.cc',
261 'app/cast_main_delegate.h',
262 'browser/cast_browser_context.cc',
263 'browser/cast_browser_context.h',
264 'browser/cast_browser_main_parts.cc',
265 'browser/cast_browser_main_parts.h',
266 'browser/cast_browser_process.cc',
267 'browser/cast_browser_process.h',
268 'browser/cast_content_browser_client.cc',
269 'browser/cast_content_browser_client.h',
270 'browser/cast_content_window.cc',
271 'browser/cast_content_window.h',
272 'browser/cast_download_manager_delegate.cc',
273 'browser/cast_download_manager_delegate.h',
274 'browser/cast_http_user_agent_settings.cc',
275 'browser/cast_http_user_agent_settings.h',
276 'browser/cast_net_log.cc',
277 'browser/cast_net_log.h',
278 'browser/cast_network_delegate.cc',
279 'browser/cast_network_delegate.h',
280 'browser/cast_permission_manager.cc',
281 'browser/cast_permission_manager.h',
282 'browser/cast_quota_permission_context.cc',
283 'browser/cast_quota_permission_context.h',
284 'browser/cast_resource_dispatcher_host_delegate.cc',
285 'browser/cast_resource_dispatcher_host_delegate.h',
286 'browser/devtools/cast_dev_tools_delegate.cc',
287 'browser/devtools/cast_dev_tools_delegate.h',
288 'browser/devtools/remote_debugging_server.cc',
289 'browser/devtools/remote_debugging_server.h',
290 'browser/geolocation/cast_access_token_store.cc',
291 'browser/geolocation/cast_access_token_store.h',
292 'browser/media/cast_media_client_android.cc',
293 'browser/media/cast_media_client_android.h',
294 'browser/metrics/cast_metrics_prefs.cc',
295 'browser/metrics/cast_metrics_prefs.h',
296 'browser/metrics/cast_metrics_service_client.cc',
297 'browser/metrics/cast_metrics_service_client.h',
298 'browser/metrics/cast_stability_metrics_provider.cc',
299 'browser/metrics/cast_stability_metrics_provider.h',
300 'browser/metrics/platform_metrics_providers.h',
301 'browser/pref_service_helper.cc',
302 'browser/pref_service_helper.h',
303 'browser/service/cast_service.cc',
304 'browser/service/cast_service.h',
305 'browser/url_request_context_factory.cc',
306 'browser/url_request_context_factory.h',
307 'common/cast_content_client.cc',
308 'common/cast_content_client.h',
309 'common/cast_resource_delegate.cc',
310 'common/cast_resource_delegate.h',
311 'common/media/cast_messages.h',
312 'common/media/cast_message_generator.cc',
313 'common/media/cast_message_generator.h',
314 'common/platform_client_auth.h',
315 'common/pref_names.cc',
316 'common/pref_names.h',
317 'renderer/cast_content_renderer_client.cc',
318 'renderer/cast_content_renderer_client.h',
319 'renderer/cast_media_load_deferrer.cc',
320 'renderer/cast_media_load_deferrer.h',
321 'renderer/cast_render_process_observer.cc',
322 'renderer/cast_render_process_observer.h',
323 'renderer/key_systems_cast.cc',
324 'renderer/key_systems_cast.h',
325 'renderer/media/capabilities_message_filter.cc',
326 'renderer/media/capabilities_message_filter.h',
329 ['chromecast_branding=="Chrome"', {
331 'internal/chromecast_internal.gyp:cast_shell_internal',
335 'browser/cast_content_browser_client_simple.cc',
336 'browser/cast_network_delegate_simple.cc',
337 'browser/devtools/remote_debugging_server_simple.cc',
338 'browser/metrics/platform_metrics_providers_simple.cc',
339 'browser/pref_service_helper_simple.cc',
340 'common/platform_client_auth_simple.cc',
341 'renderer/cast_content_renderer_client_simple.cc',
346 'browser/service/cast_service_android.cc',
347 'browser/service/cast_service_android.h',
351 'browser/media/cast_browser_cdm_factory_simple.cc',
352 'browser/service/cast_service_simple.cc',
353 'browser/service/cast_service_simple.h',
358 # ExternalMetrics not necessary on Android and (as of this writing) uses
359 # non-portable filesystem operations. Also webcrypto is not used on
363 'browser/metrics/external_metrics.cc',
364 'browser/metrics/external_metrics.h',
367 '../components/components.gyp:metrics_serialization',
368 '../ui/aura/aura.gyp:aura_test_support',
373 '../components/components.gyp:cdm_browser',
379 'target_name': 'cast_sys_info',
380 'type': '<(component)',
383 '../base/base.gyp:base',
386 'base/cast_sys_info_util.h',
387 'base/cast_sys_info_dummy.cc',
388 'base/cast_sys_info_dummy.h',
391 ['chromecast_branding!="Chrome" and OS!="android"', {
393 'base/cast_sys_info_util_simple.cc',
397 }, # end of target 'cast_sys_info'
399 'target_name': 'cast_version_header',
401 'direct_dependent_settings': {
403 '<(SHARED_INTERMEDIATE_DIR)',
408 'action_name': 'version_header',
409 'message': 'Generating version header file: <@(_outputs)',
415 '<(SHARED_INTERMEDIATE_DIR)/chromecast/base/version.h',
419 '<(version_py_path)',
420 '-e', 'VERSION_FULL="<(version_full)"',
421 # CAST_BUILD_INCREMENTAL is taken from buildbot if available;
422 # otherwise, a dev string is used.
423 '-e', 'CAST_BUILD_INCREMENTAL="<!(echo ${CAST_BUILD_INCREMENTAL:="<!(date +%Y%m%d.%H%M%S)"})"',
424 # CAST_BUILD_RELEASE is taken from cast_build_release file if exist;
425 # otherwise, a dev string is used.
426 '-e', 'CAST_BUILD_RELEASE="<!(if test -f <(cast_build_release); then cat <(cast_build_release); else echo eng.${USER}; fi)"',
427 '-e', 'CAST_IS_DEBUG_BUILD=1 if "<(CONFIGURATION_NAME)" == "Debug" or <(cast_is_debug_build) == 1 else 0',
428 '-e', 'CAST_PRODUCT_TYPE=<(cast_product_type)',
433 '../build/util/version.gypi',
440 # Targets for Android receiver.
445 'target_name': 'cast_shell_icudata',
448 '../third_party/icu/icu.gyp:icudata',
449 '../v8/tools/gyp/v8.gyp:v8_external_snapshot',
452 'destination': '<(PRODUCT_DIR)/assets',
454 '<(PRODUCT_DIR)/icudtl.dat',
455 '<(PRODUCT_DIR)/natives_blob.bin',
456 '<(PRODUCT_DIR)/snapshot_blob.bin',
461 'target_name': 'libcast_shell_android',
462 'type': 'shared_library',
466 'cast_shell_icudata',
468 'cast_version_header',
469 '../base/base.gyp:base',
470 '../breakpad/breakpad.gyp:breakpad_client',
471 '../components/components.gyp:breakpad_host',
472 '../components/components.gyp:crash_component',
473 '../components/components.gyp:external_video_surface',
474 '../content/content.gyp:content',
475 '../skia/skia.gyp:skia',
476 '../ui/gfx/gfx.gyp:gfx',
477 '../ui/gl/gl.gyp:gl',
483 'android/cast_jni_registrar.cc',
484 'android/cast_jni_registrar.h',
485 'android/cast_metrics_helper_android.cc',
486 'android/cast_metrics_helper_android.h',
487 'android/platform_jni_loader.h',
488 'app/android/cast_crash_reporter_client_android.cc',
489 'app/android/cast_crash_reporter_client_android.h',
490 'app/android/cast_jni_loader.cc',
491 'app/android/crash_handler.cc',
492 'app/android/crash_handler.h',
493 'base/cast_sys_info_android.cc',
494 'base/cast_sys_info_android.h',
495 'base/chromecast_config_android.cc',
496 'base/chromecast_config_android.h',
497 'browser/android/cast_window_android.cc',
498 'browser/android/cast_window_android.h',
499 'browser/android/cast_window_manager.cc',
500 'browser/android/cast_window_manager.h',
503 ['chromecast_branding=="Chrome"', {
505 'internal/chromecast_internal.gyp:cast_shell_android_internal'
509 'android/platform_jni_loader_stub.cc',
513 }, # end of target 'libcast_shell_android'
515 'target_name': 'cast_base_java',
518 '../base/base.gyp:base_java',
521 'android_manifest_path': 'android/AndroidManifest.xml',
522 'java_in_dir': 'base/java',
524 'includes': ['../build/java.gypi'],
525 }, # end of target 'cast_base_java'
527 'target_name': 'cast_shell_java',
530 '<(android_support_v13_target)',
532 'cast_shell_manifest',
533 '../base/base.gyp:base_java',
534 '../components/components.gyp:external_video_surface_java',
535 '../content/content.gyp:content_java',
536 '../media/media.gyp:media_java',
537 '../net/net.gyp:net_java',
538 '../ui/android/ui_android.gyp:ui_java',
541 'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
542 'has_java_resources': 1,
543 'java_in_dir': 'browser/android/apk',
544 'resource_dir': 'browser/android/apk/res',
545 'R_package': 'org.chromium.chromecast.shell',
547 'includes': ['../build/java.gypi'],
548 }, # end of target 'cast_shell_java'
550 'target_name': 'cast_shell_manifest',
553 'jinja_inputs': ['browser/android/apk/AndroidManifest.xml.jinja2'],
554 'jinja_output': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
556 'includes': [ '../build/android/jinja_template.gypi' ],
559 'target_name': 'cast_shell_apk',
563 'libcast_shell_android',
566 'apk_name': 'CastShell',
567 'manifest_package_name': 'org.chromium.chromecast.shell',
568 # Note(gunsch): there are no Java files in the android/ directory.
569 # Unfortunately, the java_apk.gypi target rigidly insists on having
570 # a java_in_dir directory, but complains about duplicate classes
571 # from the common cast_shell_java target (shared with internal APK)
572 # if the actual Java path is used.
573 # This will hopefully be removable after the great GN migration.
574 'java_in_dir': 'android',
575 'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
576 'package_name': 'org.chromium.chromecast.shell',
577 'native_lib_target': 'libcast_shell_android',
578 'asset_location': '<(PRODUCT_DIR)/assets',
579 'additional_input_paths': ['<(PRODUCT_DIR)/assets/cast_shell.pak'],
581 'includes': [ '../build/java_apk.gypi' ],
584 'target_name': 'cast_jni_headers',
587 'base/java/src/org/chromium/chromecast/base/ChromecastConfigAndroid.java',
588 'browser/android/apk/src/org/chromium/chromecast/shell/CastCrashHandler.java',
589 'browser/android/apk/src/org/chromium/chromecast/shell/CastMetricsHelper.java',
590 'browser/android/apk/src/org/chromium/chromecast/shell/CastSysInfoAndroid.java',
591 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java',
592 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowManager.java',
594 'direct_dependent_settings': {
596 '<(SHARED_INTERMEDIATE_DIR)/chromecast',
600 'jni_gen_package': 'chromecast',
602 'includes': [ '../build/jni_generator.gypi' ],
605 }, { # OS != "android"
608 'target_name': 'cast_shell_media',
609 'type': '<(component)',
611 'media/media.gyp:cast_media',
612 '../content/content.gyp:content',
613 '../ipc/ipc.gyp:ipc',
614 '../media/media.gyp:media',
617 'browser/media/cast_browser_cdm_factory.cc',
618 'browser/media/cast_browser_cdm_factory.h',
619 'browser/media/cma_message_filter_host.cc',
620 'browser/media/cma_message_filter_host.h',
621 'browser/media/cma_message_loop.cc',
622 'browser/media/cma_message_loop.h',
623 'browser/media/media_pipeline_host.cc',
624 'browser/media/media_pipeline_host.h',
625 'common/media/cma_ipc_common.h',
626 'common/media/cma_messages.h',
627 'common/media/cma_message_generator.cc',
628 'common/media/cma_message_generator.h',
629 'common/media/cma_param_traits.cc',
630 'common/media/cma_param_traits.h',
631 'common/media/shared_memory_chunk.cc',
632 'common/media/shared_memory_chunk.h',
633 'renderer/media/audio_pipeline_proxy.cc',
634 'renderer/media/audio_pipeline_proxy.h',
635 'renderer/media/chromecast_media_renderer_factory.cc',
636 'renderer/media/chromecast_media_renderer_factory.h',
637 'renderer/media/cma_message_filter_proxy.cc',
638 'renderer/media/cma_message_filter_proxy.h',
639 'renderer/media/media_channel_proxy.cc',
640 'renderer/media/media_channel_proxy.h',
641 'renderer/media/media_pipeline_proxy.cc',
642 'renderer/media/media_pipeline_proxy.h',
643 'renderer/media/video_pipeline_proxy.cc',
644 'renderer/media/video_pipeline_proxy.h',
646 }, # end of target 'cast_shell_media'
647 # This target contains all of the primary code of |cast_shell|, except
648 # for |main|. This allows end-to-end tests using |cast_shell|.
649 # This also includes all targets that cannot be built on Android.
651 'target_name': 'cast_shell_core',
652 'type': '<(component)',
656 'media/media.gyp:cast_media',
659 ['ozone_platform_egltest==1', {
661 '../ui/ozone/ozone.gyp:eglplatform_shim_x11',
667 'target_name': 'cast_shell',
668 'type': 'executable',
676 # Allow OEMs to override default libraries that are shipped with
677 # cast receiver package by installed OEM-specific libraries in
679 '-Wl,-rpath=/oem_cast_shlib',
680 # TODO(dougsteed): remove when Chromecast moves to boringssl.
681 # Allow the cast shell to find the NSS module in the same
683 '-Wl,-rpath=\$$ORIGIN'
688 ['enable_default_cast_graphics==1', {
691 'target_name': 'libcast_graphics_1.0',
692 'type': 'shared_library',
697 'graphics/cast_egl_platform_default.cc',
698 'graphics/graphics_properties_default.cc',
699 'graphics/osd_plane_default.cc'
704 ], # end of conditions