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_codec_support.h',
47 'public/media/audio_pipeline_device.h',
48 'public/media/cast_decoder_buffer.h',
49 'public/media/cast_decrypt_config.h',
50 'public/media/cast_key_system.h',
51 'public/media/decoder_config.h',
52 'public/media/decrypt_context.h',
53 'public/media/media_clock_device.h',
54 'public/media/media_component_device.h',
55 'public/media/media_pipeline_backend.h',
56 'public/media/media_pipeline_device_params.h',
57 'public/media/stream_id.h',
58 'public/media/video_pipeline_device.h',
60 'public/osd_plane_shlib.h',
61 'public/osd_surface.h',
62 'public/task_runner.h',
63 'public/video_plane.h',
65 'direct_dependent_settings': {
72 'target_name': 'cast_base',
73 'type': '<(component)',
75 '../base/base.gyp:base',
78 'base/android/dumpstate_writer.cc',
79 'base/android/dumpstate_writer.h',
80 'base/android/system_time_change_notifier_android.cc',
81 'base/android/system_time_change_notifier_android.h',
84 'base/cast_resource.h',
85 'base/chromecast_config_android.cc',
86 'base/chromecast_config_android.h',
87 'base/chromecast_switches.cc',
88 'base/chromecast_switches.h',
89 'base/error_codes.cc',
91 'base/metrics/cast_histograms.h',
92 'base/metrics/cast_metrics_helper.cc',
93 'base/metrics/cast_metrics_helper.h',
94 'base/metrics/grouped_histogram.cc',
95 'base/metrics/grouped_histogram.h',
100 'base/process_utils.cc',
101 'base/process_utils.h',
102 'base/serializers.cc',
103 'base/serializers.h',
104 'base/system_time_change_notifier.cc',
105 'base/system_time_change_notifier.h',
106 'base/task_runner_impl.cc',
107 'base/task_runner_impl.h',
116 }, # end of target 'cast_base'
118 'target_name': 'cast_crash',
119 'type': '<(component)',
121 # TODO(gfhuang): we should not need to include this directly, but
122 # somehow depending on component.gyp:breakpad_component is not
123 # working as expected.
128 'cast_version_header',
129 '../breakpad/breakpad.gyp:breakpad_client',
132 'crash/app_state_tracker.cc',
133 'crash/app_state_tracker.h',
134 'crash/cast_crash_keys.cc',
135 'crash/cast_crash_keys.h',
136 'crash/cast_crashdump_uploader.cc',
137 'crash/cast_crashdump_uploader.h',
138 'crash/linux/crash_util.cc',
139 'crash/linux/crash_util.h',
140 'crash/linux/dummy_minidump_generator.cc',
141 'crash/linux/dummy_minidump_generator.h',
142 'crash/linux/dump_info.cc',
143 'crash/linux/dump_info.h',
144 'crash/linux/minidump_generator.h',
145 'crash/linux/synchronized_minidump_manager.cc',
146 'crash/linux/synchronized_minidump_manager.h',
147 'crash/linux/minidump_params.cc',
148 'crash/linux/minidump_params.h',
149 'crash/linux/minidump_writer.cc',
150 'crash/linux/minidump_writer.h',
152 }, # end of target 'cast_crash'
154 'target_name': 'cast_crash_client',
155 'type': '<(component)',
158 '../breakpad/breakpad.gyp:breakpad_client',
159 '../components/components.gyp:crash_component',
160 '../content/content.gyp:content_common',
166 'app/android/crash_handler.cc',
167 'app/android/crash_handler.h',
168 'app/android/cast_crash_reporter_client_android.cc',
169 'app/android/cast_crash_reporter_client_android.h',
170 'app/linux/cast_crash_reporter_client.cc',
171 'app/linux/cast_crash_reporter_client.h',
180 }, # end of target 'cast_crash_client'
182 'target_name': 'cast_crypto',
183 'type': '<(component)',
185 '../base/base.gyp:base',
188 'crypto/signature_cache.cc',
189 'crypto/signature_cache.h',
193 'target_name': 'cast_net',
194 'type': '<(component)',
196 'net/connectivity_checker.cc',
197 'net/connectivity_checker.h',
198 'net/connectivity_checker_impl.cc',
199 'net/connectivity_checker_impl.h',
200 'net/fake_connectivity_checker.cc',
201 'net/fake_connectivity_checker.h',
202 'net/net_switches.cc',
203 'net/net_switches.h',
204 'net/net_util_cast.cc',
205 'net/net_util_cast.h',
210 'net/network_change_notifier_factory_cast.cc',
211 'net/network_change_notifier_factory_cast.h',
217 'target_name': 'cast_shell_resources',
220 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chromecast',
224 'action_name': 'cast_shell_resources',
226 'grit_grd_file': 'app/resources/shell_resources.grd',
227 'grit_resource_ids': 'app/resources/resource_ids',
229 'includes': [ '../build/grit_action.gypi' ],
232 'includes': [ '../build/grit_target.gypi' ],
235 'target_name': 'cast_shell_pak',
238 'cast_shell_resources',
239 '../content/app/resources/content_resources.gyp:content_resources',
240 '../content/app/strings/content_strings.gyp:content_strings',
241 '../net/net.gyp:net_resources',
242 '../third_party/WebKit/public/blink_resources.gyp:blink_resources',
243 '../ui/resources/ui_resources.gyp:ui_resources',
244 '../ui/strings/ui_strings.gyp:ui_strings',
248 'action_name': 'repack_cast_shell_pak',
251 '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_resources.pak',
252 '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_image_resources_100_percent.pak',
253 '<(SHARED_INTERMEDIATE_DIR)/chromecast/shell_resources.pak',
254 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
255 '<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_100_percent.pak',
256 '<(SHARED_INTERMEDIATE_DIR)/content/app/strings/content_strings_en-US.pak',
257 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
258 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percent.pak',
259 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/webui_resources.pak',
260 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/app_locale_settings_en-US.pak',
261 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/ui_strings_en-US.pak',
264 ['chromecast_branding!="public" and use_chromecast_webui==1', {
266 '<(SHARED_INTERMEDIATE_DIR)/chromecast/app_resources.pak',
267 '<(SHARED_INTERMEDIATE_DIR)/chromecast/cast_webui_resources.pak',
270 ['chromecast_branding!="public"', {
272 '<(SHARED_INTERMEDIATE_DIR)/chromecast/sound_resources.pak',
276 'pak_output': '<(PRODUCT_DIR)/assets/cast_shell.pak',
278 'includes': [ '../build/repack_action.gypi' ],
282 ['chromecast_branding!="public" and use_chromecast_webui==1', {
284 'internal/chromecast_resources.gyp:chromecast_app_resources',
285 'internal/chromecast_resources.gyp:chromecast_webui_resources',
288 ['chromecast_branding!="public"', {
290 'internal/chromecast_resources.gyp:chromecast_sound_resources',
294 }, # end of target 'cast_shell_pak'
295 # This target contains all content-embedder implementation that is
296 # non-platform-specific.
298 'target_name': 'cast_shell_common',
299 'type': '<(component)',
305 'cast_shell_resources',
307 'cast_version_header',
308 'chromecast_locales.gyp:chromecast_locales_pak',
309 'chromecast_locales.gyp:chromecast_settings',
310 'media/media.gyp:media_base',
311 'media/media.gyp:media_cdm',
312 '../base/base.gyp:base',
313 '../components/components.gyp:breakpad_host',
314 '../components/components.gyp:cdm_renderer',
315 '../components/components.gyp:component_metrics_proto',
316 '../components/components.gyp:crash_component',
317 '../components/components.gyp:devtools_discovery',
318 '../components/components.gyp:devtools_http_handler',
319 '../components/components.gyp:network_hints_browser',
320 '../components/components.gyp:network_hints_renderer',
321 '../components/components.gyp:metrics',
322 '../components/components.gyp:metrics_gpu',
323 '../components/components.gyp:metrics_net',
324 '../components/components.gyp:metrics_profiler',
325 '../content/content.gyp:content',
326 '../content/content.gyp:content_app_both',
327 '../skia/skia.gyp:skia',
328 '../third_party/WebKit/public/blink.gyp:blink',
329 '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
332 'app/cast_main_delegate.cc',
333 'app/cast_main_delegate.h',
334 'browser/android/cast_window_android.cc',
335 'browser/android/cast_window_android.h',
336 'browser/android/cast_window_manager.cc',
337 'browser/android/cast_window_manager.h',
338 'browser/cast_browser_context.cc',
339 'browser/cast_browser_context.h',
340 'browser/cast_browser_main_parts.cc',
341 'browser/cast_browser_main_parts.h',
342 'browser/cast_browser_process.cc',
343 'browser/cast_browser_process.h',
344 'browser/cast_content_browser_client.cc',
345 'browser/cast_content_browser_client.h',
346 'browser/cast_content_window.cc',
347 'browser/cast_content_window.h',
348 'browser/cast_download_manager_delegate.cc',
349 'browser/cast_download_manager_delegate.h',
350 'browser/cast_http_user_agent_settings.cc',
351 'browser/cast_http_user_agent_settings.h',
352 'browser/cast_net_log.cc',
353 'browser/cast_net_log.h',
354 'browser/cast_network_delegate.cc',
355 'browser/cast_network_delegate.h',
356 'browser/cast_permission_manager.cc',
357 'browser/cast_permission_manager.h',
358 'browser/cast_quota_permission_context.cc',
359 'browser/cast_quota_permission_context.h',
360 'browser/cast_resource_dispatcher_host_delegate.cc',
361 'browser/cast_resource_dispatcher_host_delegate.h',
362 'browser/devtools/cast_dev_tools_delegate.cc',
363 'browser/devtools/cast_dev_tools_delegate.h',
364 'browser/devtools/remote_debugging_server.cc',
365 'browser/devtools/remote_debugging_server.h',
366 'browser/geolocation/cast_access_token_store.cc',
367 'browser/geolocation/cast_access_token_store.h',
368 'browser/media/cast_media_client_android.cc',
369 'browser/media/cast_media_client_android.h',
370 'browser/metrics/cast_metrics_prefs.cc',
371 'browser/metrics/cast_metrics_prefs.h',
372 'browser/metrics/cast_metrics_service_client.cc',
373 'browser/metrics/cast_metrics_service_client.h',
374 'browser/metrics/cast_stability_metrics_provider.cc',
375 'browser/metrics/cast_stability_metrics_provider.h',
376 'browser/pref_service_helper.cc',
377 'browser/pref_service_helper.h',
378 'browser/service/cast_service_simple.cc',
379 'browser/service/cast_service_simple.h',
380 'browser/url_request_context_factory.cc',
381 'browser/url_request_context_factory.h',
382 'common/cast_content_client.cc',
383 'common/cast_content_client.h',
384 'common/cast_resource_delegate.cc',
385 'common/cast_resource_delegate.h',
386 'common/media/cast_messages.h',
387 'common/media/cast_message_generator.cc',
388 'common/media/cast_message_generator.h',
389 'common/platform_client_auth.h',
390 'renderer/cast_content_renderer_client.cc',
391 'renderer/cast_content_renderer_client.h',
392 'renderer/cast_media_load_deferrer.cc',
393 'renderer/cast_media_load_deferrer.h',
394 'renderer/cast_render_process_observer.cc',
395 'renderer/cast_render_process_observer.h',
396 'renderer/key_systems_cast.cc',
397 'renderer/key_systems_cast.h',
398 'renderer/media/capabilities_message_filter.cc',
399 'renderer/media/capabilities_message_filter.h',
400 'service/cast_service.cc',
401 'service/cast_service.h',
404 ['chromecast_branding!="public"', {
406 'internal/chromecast_internal.gyp:cast_shell_internal',
410 'browser/cast_content_browser_client_simple.cc',
411 'browser/cast_network_delegate_simple.cc',
412 'browser/pref_service_helper_simple.cc',
413 'common/platform_client_auth_simple.cc',
414 'renderer/cast_content_renderer_client_simple.cc',
417 # ExternalMetrics not necessary on Android and (as of this writing) uses
418 # non-portable filesystem operations. Also webcrypto is not used on
422 'browser/metrics/external_metrics.cc',
423 'browser/metrics/external_metrics.h',
424 'graphics/cast_screen.cc',
425 'graphics/cast_screen.h',
428 '../components/components.gyp:metrics_serialization',
433 '../components/components.gyp:cdm_browser',
434 '../components/components.gyp:external_video_surface',
441 'target_name': 'cast_sys_info',
442 'type': '<(component)',
445 '../base/base.gyp:base',
448 'base/cast_sys_info_util.h',
449 'base/cast_sys_info_dummy.cc',
450 'base/cast_sys_info_dummy.h',
451 'base/cast_sys_info_android.cc',
452 'base/cast_sys_info_android.h',
458 'cast_version_header',
461 ['chromecast_branding=="public" and OS!="android"', {
463 'base/cast_sys_info_util_simple.cc',
467 }, # end of target 'cast_sys_info'
469 'target_name': 'cast_version_header',
471 'direct_dependent_settings': {
473 '<(SHARED_INTERMEDIATE_DIR)',
478 'action_name': 'version_header',
479 'message': 'Generating version header file: <@(_outputs)',
485 '<(SHARED_INTERMEDIATE_DIR)/chromecast/base/version.h',
489 '<(version_py_path)',
490 '-e', 'VERSION_FULL="<(version_full)"',
491 # CAST_BUILD_INCREMENTAL is taken from buildbot if available;
492 # otherwise, a dev string is used.
493 '-e', 'CAST_BUILD_INCREMENTAL="<!(echo ${CAST_BUILD_INCREMENTAL:="<!(date +%Y%m%d.%H%M%S)"})"',
494 # CAST_BUILD_RELEASE is taken from cast_build_release file if exist;
495 # otherwise, a dev string is used.
496 '-e', 'CAST_BUILD_RELEASE="<!(if test -f <(cast_build_release); then cat <(cast_build_release); else echo eng.${USER}; fi)"',
497 '-e', 'CAST_IS_DEBUG_BUILD=1 if "<(CONFIGURATION_NAME)" == "Debug" or <(cast_is_debug_build) == 1 else 0',
498 '-e', 'CAST_PRODUCT_TYPE=<(cast_product_type)',
503 '../build/util/version.gypi',
510 # Targets for Android receiver.
515 'target_name': 'cast_shell_icudata',
518 '../third_party/icu/icu.gyp:icudata',
519 '../v8/tools/gyp/v8.gyp:v8_external_snapshot',
522 'destination': '<(PRODUCT_DIR)/assets',
524 '<(PRODUCT_DIR)/icudtl.dat',
525 '<(PRODUCT_DIR)/natives_blob.bin',
526 '<(PRODUCT_DIR)/snapshot_blob.bin',
531 'target_name': 'libcast_shell_android',
532 'type': 'shared_library',
536 'cast_shell_icudata',
538 'cast_version_header',
539 '../base/base.gyp:base',
540 '../components/components.gyp:breakpad_host',
541 '../content/content.gyp:content',
542 '../skia/skia.gyp:skia',
543 '../ui/gfx/gfx.gyp:gfx',
544 '../ui/gl/gl.gyp:gl',
547 'android/cast_jni_registrar.cc',
548 'android/cast_jni_registrar.h',
549 'android/cast_metrics_helper_android.cc',
550 'android/cast_metrics_helper_android.h',
551 'android/platform_jni_loader.h',
552 'app/android/cast_jni_loader.cc',
555 ['chromecast_branding!="public"', {
557 'internal/chromecast_internal.gyp:cast_shell_android_internal'
561 'android/platform_jni_loader_stub.cc',
565 }, # end of target 'libcast_shell_android'
567 'target_name': 'cast_base_java',
570 '../base/base.gyp:base_java',
573 'android_manifest_path': 'android/AndroidManifest.xml',
574 'java_in_dir': 'base/java',
576 'includes': ['../build/java.gypi'],
577 }, # end of target 'cast_base_java'
579 'target_name': 'cast_shell_java',
582 '<(android_support_v13_target)',
584 'cast_shell_manifest',
585 '../base/base.gyp:base_java',
586 '../components/components.gyp:external_video_surface_java',
587 '../content/content.gyp:content_java',
588 '../media/media.gyp:media_java',
589 '../net/net.gyp:net_java',
590 '../ui/android/ui_android.gyp:ui_java',
593 'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
594 'has_java_resources': 1,
595 'java_in_dir': 'browser/android/apk',
596 'resource_dir': 'browser/android/apk/res',
597 'R_package': 'org.chromium.chromecast.shell',
599 'includes': ['../build/java.gypi'],
600 }, # end of target 'cast_shell_java'
602 'target_name': 'cast_shell_manifest',
605 'jinja_inputs': ['browser/android/apk/AndroidManifest.xml.jinja2'],
606 'jinja_output': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
608 'includes': [ '../build/android/jinja_template.gypi' ],
611 'target_name': 'cast_shell_apk',
615 'libcast_shell_android',
618 'apk_name': 'CastShell',
619 'manifest_package_name': 'org.chromium.chromecast.shell',
620 # Note(gunsch): there are no Java files in the android/ directory.
621 # Unfortunately, the java_apk.gypi target rigidly insists on having
622 # a java_in_dir directory, but complains about duplicate classes
623 # from the common cast_shell_java target (shared with internal APK)
624 # if the actual Java path is used.
625 # This will hopefully be removable after the great GN migration.
626 'java_in_dir': 'android',
627 'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
628 'package_name': 'org.chromium.chromecast.shell',
629 'native_lib_target': 'libcast_shell_android',
630 'asset_location': '<(PRODUCT_DIR)/assets',
631 'additional_input_paths': ['<(PRODUCT_DIR)/assets/cast_shell.pak'],
633 'includes': [ '../build/java_apk.gypi' ],
636 'target_name': 'cast_jni_headers',
639 'base/java/src/org/chromium/chromecast/base/ChromecastConfigAndroid.java',
640 'base/java/src/org/chromium/chromecast/base/DumpstateWriter.java',
641 'base/java/src/org/chromium/chromecast/base/SystemTimeChangeNotifierAndroid.java',
642 'browser/android/apk/src/org/chromium/chromecast/shell/CastCrashHandler.java',
643 'browser/android/apk/src/org/chromium/chromecast/shell/CastMetricsHelper.java',
644 'browser/android/apk/src/org/chromium/chromecast/shell/CastSysInfoAndroid.java',
645 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java',
646 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowManager.java',
648 'direct_dependent_settings': {
650 '<(SHARED_INTERMEDIATE_DIR)/chromecast',
654 'jni_gen_package': 'chromecast',
656 'includes': [ '../build/jni_generator.gypi' ],
659 }, { # OS != "android"
662 'target_name': 'cast_shell_media',
663 'type': '<(component)',
666 'media/media.gyp:cast_media',
667 '../content/content.gyp:content',
668 '../ipc/ipc.gyp:ipc',
669 '../media/media.gyp:media',
672 'browser/media/cast_browser_cdm_factory.cc',
673 'browser/media/cast_browser_cdm_factory.h',
674 'browser/media/cma_media_pipeline_client.cc',
675 'browser/media/cma_media_pipeline_client.h',
676 'browser/media/cma_message_filter_host.cc',
677 'browser/media/cma_message_filter_host.h',
678 'browser/media/media_pipeline_host.cc',
679 'browser/media/media_pipeline_host.h',
680 'common/media/cma_ipc_common.h',
681 'common/media/cma_messages.h',
682 'common/media/cma_message_generator.cc',
683 'common/media/cma_message_generator.h',
684 'common/media/cma_param_traits.cc',
685 'common/media/cma_param_traits.h',
686 'common/media/shared_memory_chunk.cc',
687 'common/media/shared_memory_chunk.h',
688 'renderer/media/audio_pipeline_proxy.cc',
689 'renderer/media/audio_pipeline_proxy.h',
690 'renderer/media/chromecast_media_renderer_factory.cc',
691 'renderer/media/chromecast_media_renderer_factory.h',
692 'renderer/media/cma_message_filter_proxy.cc',
693 'renderer/media/cma_message_filter_proxy.h',
694 'renderer/media/media_channel_proxy.cc',
695 'renderer/media/media_channel_proxy.h',
696 'renderer/media/media_pipeline_proxy.cc',
697 'renderer/media/media_pipeline_proxy.h',
698 'renderer/media/video_pipeline_proxy.cc',
699 'renderer/media/video_pipeline_proxy.h',
701 }, # end of target 'cast_shell_media'
702 # This target contains all of the primary code of |cast_shell|, except
703 # for |main|. This allows end-to-end tests using |cast_shell|.
704 # This also includes all targets that cannot be built on Android.
706 'target_name': 'cast_shell_core',
707 'type': '<(component)',
711 'media/media.gyp:cast_media',
714 ['ozone_platform_egltest==1', {
716 '../ui/ozone/ozone.gyp:eglplatform_shim_x11',
722 'target_name': 'cast_shell',
723 'type': 'executable',
731 # Allow OEMs to override default libraries that are shipped with
732 # cast receiver package by installed OEM-specific libraries in
734 '-Wl,-rpath=/oem_cast_shlib',
735 # TODO(dougsteed): remove when Chromecast moves to boringssl.
736 # Allow the cast shell to find the NSS module in the same
738 '-Wl,-rpath=\$$ORIGIN'
743 ['enable_default_cast_graphics==1', {
746 'target_name': 'libcast_graphics_1.0',
747 'type': 'shared_library',
752 'graphics/cast_egl_platform_default.cc',
753 'graphics/graphics_properties_default.cc',
754 'graphics/osd_plane_default.cc'
759 ], # end of conditions