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/devtools/remote_debugging_server_simple.cc',
413 'browser/pref_service_helper_simple.cc',
414 'common/platform_client_auth_simple.cc',
415 'renderer/cast_content_renderer_client_simple.cc',
420 'browser/media/cast_browser_cdm_factory_simple.cc',
425 # ExternalMetrics not necessary on Android and (as of this writing) uses
426 # non-portable filesystem operations. Also webcrypto is not used on
430 'browser/metrics/external_metrics.cc',
431 'browser/metrics/external_metrics.h',
432 'graphics/cast_screen.cc',
433 'graphics/cast_screen.h',
436 '../components/components.gyp:metrics_serialization',
441 '../components/components.gyp:cdm_browser',
442 '../components/components.gyp:external_video_surface',
449 'target_name': 'cast_sys_info',
450 'type': '<(component)',
453 '../base/base.gyp:base',
456 'base/cast_sys_info_util.h',
457 'base/cast_sys_info_dummy.cc',
458 'base/cast_sys_info_dummy.h',
459 'base/cast_sys_info_android.cc',
460 'base/cast_sys_info_android.h',
468 ['chromecast_branding=="public" and OS!="android"', {
470 'base/cast_sys_info_util_simple.cc',
474 }, # end of target 'cast_sys_info'
476 'target_name': 'cast_version_header',
478 'direct_dependent_settings': {
480 '<(SHARED_INTERMEDIATE_DIR)',
485 'action_name': 'version_header',
486 'message': 'Generating version header file: <@(_outputs)',
492 '<(SHARED_INTERMEDIATE_DIR)/chromecast/base/version.h',
496 '<(version_py_path)',
497 '-e', 'VERSION_FULL="<(version_full)"',
498 # CAST_BUILD_INCREMENTAL is taken from buildbot if available;
499 # otherwise, a dev string is used.
500 '-e', 'CAST_BUILD_INCREMENTAL="<!(echo ${CAST_BUILD_INCREMENTAL:="<!(date +%Y%m%d.%H%M%S)"})"',
501 # CAST_BUILD_RELEASE is taken from cast_build_release file if exist;
502 # otherwise, a dev string is used.
503 '-e', 'CAST_BUILD_RELEASE="<!(if test -f <(cast_build_release); then cat <(cast_build_release); else echo eng.${USER}; fi)"',
504 '-e', 'CAST_IS_DEBUG_BUILD=1 if "<(CONFIGURATION_NAME)" == "Debug" or <(cast_is_debug_build) == 1 else 0',
505 '-e', 'CAST_PRODUCT_TYPE=<(cast_product_type)',
510 '../build/util/version.gypi',
517 # Targets for Android receiver.
522 'target_name': 'cast_shell_icudata',
525 '../third_party/icu/icu.gyp:icudata',
526 '../v8/tools/gyp/v8.gyp:v8_external_snapshot',
529 'destination': '<(PRODUCT_DIR)/assets',
531 '<(PRODUCT_DIR)/icudtl.dat',
532 '<(PRODUCT_DIR)/natives_blob.bin',
533 '<(PRODUCT_DIR)/snapshot_blob.bin',
538 'target_name': 'libcast_shell_android',
539 'type': 'shared_library',
543 'cast_shell_icudata',
545 'cast_version_header',
546 '../base/base.gyp:base',
547 '../components/components.gyp:breakpad_host',
548 '../content/content.gyp:content',
549 '../skia/skia.gyp:skia',
550 '../ui/gfx/gfx.gyp:gfx',
551 '../ui/gl/gl.gyp:gl',
554 'android/cast_jni_registrar.cc',
555 'android/cast_jni_registrar.h',
556 'android/cast_metrics_helper_android.cc',
557 'android/cast_metrics_helper_android.h',
558 'android/platform_jni_loader.h',
559 'app/android/cast_jni_loader.cc',
562 ['chromecast_branding!="public"', {
564 'internal/chromecast_internal.gyp:cast_shell_android_internal'
568 'android/platform_jni_loader_stub.cc',
572 }, # end of target 'libcast_shell_android'
574 'target_name': 'cast_base_java',
577 '../base/base.gyp:base_java',
580 'android_manifest_path': 'android/AndroidManifest.xml',
581 'java_in_dir': 'base/java',
583 'includes': ['../build/java.gypi'],
584 }, # end of target 'cast_base_java'
586 'target_name': 'cast_shell_java',
589 '<(android_support_v13_target)',
591 'cast_shell_manifest',
592 '../base/base.gyp:base_java',
593 '../components/components.gyp:external_video_surface_java',
594 '../content/content.gyp:content_java',
595 '../media/media.gyp:media_java',
596 '../net/net.gyp:net_java',
597 '../ui/android/ui_android.gyp:ui_java',
600 'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
601 'has_java_resources': 1,
602 'java_in_dir': 'browser/android/apk',
603 'resource_dir': 'browser/android/apk/res',
604 'R_package': 'org.chromium.chromecast.shell',
606 'includes': ['../build/java.gypi'],
607 }, # end of target 'cast_shell_java'
609 'target_name': 'cast_shell_manifest',
612 'jinja_inputs': ['browser/android/apk/AndroidManifest.xml.jinja2'],
613 'jinja_output': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
615 'includes': [ '../build/android/jinja_template.gypi' ],
618 'target_name': 'cast_shell_apk',
622 'libcast_shell_android',
625 'apk_name': 'CastShell',
626 'manifest_package_name': 'org.chromium.chromecast.shell',
627 # Note(gunsch): there are no Java files in the android/ directory.
628 # Unfortunately, the java_apk.gypi target rigidly insists on having
629 # a java_in_dir directory, but complains about duplicate classes
630 # from the common cast_shell_java target (shared with internal APK)
631 # if the actual Java path is used.
632 # This will hopefully be removable after the great GN migration.
633 'java_in_dir': 'android',
634 'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
635 'package_name': 'org.chromium.chromecast.shell',
636 'native_lib_target': 'libcast_shell_android',
637 'asset_location': '<(PRODUCT_DIR)/assets',
638 'additional_input_paths': ['<(PRODUCT_DIR)/assets/cast_shell.pak'],
640 'includes': [ '../build/java_apk.gypi' ],
643 'target_name': 'cast_jni_headers',
646 'base/java/src/org/chromium/chromecast/base/ChromecastConfigAndroid.java',
647 'base/java/src/org/chromium/chromecast/base/DumpstateWriter.java',
648 'base/java/src/org/chromium/chromecast/base/SystemTimeChangeNotifierAndroid.java',
649 'browser/android/apk/src/org/chromium/chromecast/shell/CastCrashHandler.java',
650 'browser/android/apk/src/org/chromium/chromecast/shell/CastMetricsHelper.java',
651 'browser/android/apk/src/org/chromium/chromecast/shell/CastSysInfoAndroid.java',
652 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java',
653 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowManager.java',
655 'direct_dependent_settings': {
657 '<(SHARED_INTERMEDIATE_DIR)/chromecast',
661 'jni_gen_package': 'chromecast',
663 'includes': [ '../build/jni_generator.gypi' ],
666 }, { # OS != "android"
669 'target_name': 'cast_shell_media',
670 'type': '<(component)',
673 'media/media.gyp:cast_media',
674 '../content/content.gyp:content',
675 '../ipc/ipc.gyp:ipc',
676 '../media/media.gyp:media',
679 'browser/media/cast_browser_cdm_factory.cc',
680 'browser/media/cast_browser_cdm_factory.h',
681 'browser/media/cma_media_pipeline_client.cc',
682 'browser/media/cma_media_pipeline_client.h',
683 'browser/media/cma_message_filter_host.cc',
684 'browser/media/cma_message_filter_host.h',
685 'browser/media/media_pipeline_host.cc',
686 'browser/media/media_pipeline_host.h',
687 'common/media/cma_ipc_common.h',
688 'common/media/cma_messages.h',
689 'common/media/cma_message_generator.cc',
690 'common/media/cma_message_generator.h',
691 'common/media/cma_param_traits.cc',
692 'common/media/cma_param_traits.h',
693 'common/media/shared_memory_chunk.cc',
694 'common/media/shared_memory_chunk.h',
695 'renderer/media/audio_pipeline_proxy.cc',
696 'renderer/media/audio_pipeline_proxy.h',
697 'renderer/media/chromecast_media_renderer_factory.cc',
698 'renderer/media/chromecast_media_renderer_factory.h',
699 'renderer/media/cma_message_filter_proxy.cc',
700 'renderer/media/cma_message_filter_proxy.h',
701 'renderer/media/media_channel_proxy.cc',
702 'renderer/media/media_channel_proxy.h',
703 'renderer/media/media_pipeline_proxy.cc',
704 'renderer/media/media_pipeline_proxy.h',
705 'renderer/media/video_pipeline_proxy.cc',
706 'renderer/media/video_pipeline_proxy.h',
708 }, # end of target 'cast_shell_media'
709 # This target contains all of the primary code of |cast_shell|, except
710 # for |main|. This allows end-to-end tests using |cast_shell|.
711 # This also includes all targets that cannot be built on Android.
713 'target_name': 'cast_shell_core',
714 'type': '<(component)',
718 'media/media.gyp:cast_media',
721 ['ozone_platform_egltest==1', {
723 '../ui/ozone/ozone.gyp:eglplatform_shim_x11',
729 'target_name': 'cast_shell',
730 'type': 'executable',
738 # Allow OEMs to override default libraries that are shipped with
739 # cast receiver package by installed OEM-specific libraries in
741 '-Wl,-rpath=/oem_cast_shlib',
742 # TODO(dougsteed): remove when Chromecast moves to boringssl.
743 # Allow the cast shell to find the NSS module in the same
745 '-Wl,-rpath=\$$ORIGIN'
750 ['enable_default_cast_graphics==1', {
753 'target_name': 'libcast_graphics_1.0',
754 'type': 'shared_library',
759 'graphics/cast_egl_platform_default.cc',
760 'graphics/graphics_properties_default.cc',
761 'graphics/osd_plane_default.cc'
766 ], # end of conditions