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',
365 'graphics/cast_screen.cc',
366 'graphics/cast_screen.h',
369 '../components/components.gyp:metrics_serialization',
370 '../ui/aura/aura.gyp:aura_test_support',
375 '../components/components.gyp:cdm_browser',
381 'target_name': 'cast_sys_info',
382 'type': '<(component)',
385 '../base/base.gyp:base',
388 'base/cast_sys_info_util.h',
389 'base/cast_sys_info_dummy.cc',
390 'base/cast_sys_info_dummy.h',
393 ['chromecast_branding!="Chrome" and OS!="android"', {
395 'base/cast_sys_info_util_simple.cc',
399 }, # end of target 'cast_sys_info'
401 'target_name': 'cast_version_header',
403 'direct_dependent_settings': {
405 '<(SHARED_INTERMEDIATE_DIR)',
410 'action_name': 'version_header',
411 'message': 'Generating version header file: <@(_outputs)',
417 '<(SHARED_INTERMEDIATE_DIR)/chromecast/base/version.h',
421 '<(version_py_path)',
422 '-e', 'VERSION_FULL="<(version_full)"',
423 # CAST_BUILD_INCREMENTAL is taken from buildbot if available;
424 # otherwise, a dev string is used.
425 '-e', 'CAST_BUILD_INCREMENTAL="<!(echo ${CAST_BUILD_INCREMENTAL:="<!(date +%Y%m%d.%H%M%S)"})"',
426 # CAST_BUILD_RELEASE is taken from cast_build_release file if exist;
427 # otherwise, a dev string is used.
428 '-e', 'CAST_BUILD_RELEASE="<!(if test -f <(cast_build_release); then cat <(cast_build_release); else echo eng.${USER}; fi)"',
429 '-e', 'CAST_IS_DEBUG_BUILD=1 if "<(CONFIGURATION_NAME)" == "Debug" or <(cast_is_debug_build) == 1 else 0',
430 '-e', 'CAST_PRODUCT_TYPE=<(cast_product_type)',
435 '../build/util/version.gypi',
442 # Targets for Android receiver.
447 'target_name': 'cast_shell_icudata',
450 '../third_party/icu/icu.gyp:icudata',
451 '../v8/tools/gyp/v8.gyp:v8_external_snapshot',
454 'destination': '<(PRODUCT_DIR)/assets',
456 '<(PRODUCT_DIR)/icudtl.dat',
457 '<(PRODUCT_DIR)/natives_blob.bin',
458 '<(PRODUCT_DIR)/snapshot_blob.bin',
463 'target_name': 'libcast_shell_android',
464 'type': 'shared_library',
468 'cast_shell_icudata',
470 'cast_version_header',
471 '../base/base.gyp:base',
472 '../breakpad/breakpad.gyp:breakpad_client',
473 '../components/components.gyp:breakpad_host',
474 '../components/components.gyp:crash_component',
475 '../components/components.gyp:external_video_surface',
476 '../content/content.gyp:content',
477 '../skia/skia.gyp:skia',
478 '../ui/gfx/gfx.gyp:gfx',
479 '../ui/gl/gl.gyp:gl',
485 'android/cast_jni_registrar.cc',
486 'android/cast_jni_registrar.h',
487 'android/cast_metrics_helper_android.cc',
488 'android/cast_metrics_helper_android.h',
489 'android/platform_jni_loader.h',
490 'app/android/cast_crash_reporter_client_android.cc',
491 'app/android/cast_crash_reporter_client_android.h',
492 'app/android/cast_jni_loader.cc',
493 'app/android/crash_handler.cc',
494 'app/android/crash_handler.h',
495 'base/cast_sys_info_android.cc',
496 'base/cast_sys_info_android.h',
497 'base/chromecast_config_android.cc',
498 'base/chromecast_config_android.h',
499 'browser/android/cast_window_android.cc',
500 'browser/android/cast_window_android.h',
501 'browser/android/cast_window_manager.cc',
502 'browser/android/cast_window_manager.h',
505 ['chromecast_branding=="Chrome"', {
507 'internal/chromecast_internal.gyp:cast_shell_android_internal'
511 'android/platform_jni_loader_stub.cc',
515 }, # end of target 'libcast_shell_android'
517 'target_name': 'cast_base_java',
520 '../base/base.gyp:base_java',
523 'android_manifest_path': 'android/AndroidManifest.xml',
524 'java_in_dir': 'base/java',
526 'includes': ['../build/java.gypi'],
527 }, # end of target 'cast_base_java'
529 'target_name': 'cast_shell_java',
532 '<(android_support_v13_target)',
534 'cast_shell_manifest',
535 '../base/base.gyp:base_java',
536 '../components/components.gyp:external_video_surface_java',
537 '../content/content.gyp:content_java',
538 '../media/media.gyp:media_java',
539 '../net/net.gyp:net_java',
540 '../ui/android/ui_android.gyp:ui_java',
543 'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
544 'has_java_resources': 1,
545 'java_in_dir': 'browser/android/apk',
546 'resource_dir': 'browser/android/apk/res',
547 'R_package': 'org.chromium.chromecast.shell',
549 'includes': ['../build/java.gypi'],
550 }, # end of target 'cast_shell_java'
552 'target_name': 'cast_shell_manifest',
555 'jinja_inputs': ['browser/android/apk/AndroidManifest.xml.jinja2'],
556 'jinja_output': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
558 'includes': [ '../build/android/jinja_template.gypi' ],
561 'target_name': 'cast_shell_apk',
565 'libcast_shell_android',
568 'apk_name': 'CastShell',
569 'manifest_package_name': 'org.chromium.chromecast.shell',
570 # Note(gunsch): there are no Java files in the android/ directory.
571 # Unfortunately, the java_apk.gypi target rigidly insists on having
572 # a java_in_dir directory, but complains about duplicate classes
573 # from the common cast_shell_java target (shared with internal APK)
574 # if the actual Java path is used.
575 # This will hopefully be removable after the great GN migration.
576 'java_in_dir': 'android',
577 'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
578 'package_name': 'org.chromium.chromecast.shell',
579 'native_lib_target': 'libcast_shell_android',
580 'asset_location': '<(PRODUCT_DIR)/assets',
581 'additional_input_paths': ['<(PRODUCT_DIR)/assets/cast_shell.pak'],
583 'includes': [ '../build/java_apk.gypi' ],
586 'target_name': 'cast_jni_headers',
589 'base/java/src/org/chromium/chromecast/base/ChromecastConfigAndroid.java',
590 'browser/android/apk/src/org/chromium/chromecast/shell/CastCrashHandler.java',
591 'browser/android/apk/src/org/chromium/chromecast/shell/CastMetricsHelper.java',
592 'browser/android/apk/src/org/chromium/chromecast/shell/CastSysInfoAndroid.java',
593 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java',
594 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowManager.java',
596 'direct_dependent_settings': {
598 '<(SHARED_INTERMEDIATE_DIR)/chromecast',
602 'jni_gen_package': 'chromecast',
604 'includes': [ '../build/jni_generator.gypi' ],
607 }, { # OS != "android"
610 'target_name': 'cast_shell_media',
611 'type': '<(component)',
613 'media/media.gyp:cast_media',
614 '../content/content.gyp:content',
615 '../ipc/ipc.gyp:ipc',
616 '../media/media.gyp:media',
619 'browser/media/cast_browser_cdm_factory.cc',
620 'browser/media/cast_browser_cdm_factory.h',
621 'browser/media/cma_message_filter_host.cc',
622 'browser/media/cma_message_filter_host.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