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',
48 'public/osd_plane_shlib.h',
49 'public/osd_surface.h',
50 'public/video_plane.h',
53 # TODO(gunsch): Remove this fake target once it's either added or no
54 # longer referenced from internal code.
55 {'target_name': 'cast_media_audio', 'type': 'none'},
58 'target_name': 'cast_base',
59 'type': '<(component)',
61 '../base/base.gyp:base',
66 'base/chromecast_switches.cc',
67 'base/chromecast_switches.h',
68 'base/metrics/cast_histograms.h',
69 'base/metrics/cast_metrics_helper.cc',
70 'base/metrics/cast_metrics_helper.h',
71 'base/metrics/grouped_histogram.cc',
72 'base/metrics/grouped_histogram.h',
73 'base/serializers.cc',
76 }, # end of target 'cast_base'
78 'target_name': 'cast_crash_client',
79 'type': '<(component)',
81 '../breakpad/breakpad.gyp:breakpad_client',
82 '../components/components.gyp:crash_component',
85 'crash/cast_crash_keys.cc',
86 'crash/cast_crash_keys.h',
87 'crash/cast_crash_reporter_client.cc',
88 'crash/cast_crash_reporter_client.h',
91 ['chromecast_branding=="Chrome"', {
93 'internal/chromecast_internal.gyp:crash_internal',
97 'crash/cast_crash_reporter_client_simple.cc',
101 }, # end of target 'cast_crash_client'
103 'target_name': 'cast_net',
104 'type': '<(component)',
106 'net/connectivity_checker.cc',
107 'net/connectivity_checker.h',
108 'net/net_switches.cc',
109 'net/net_switches.h',
110 'net/net_util_cast.cc',
111 'net/net_util_cast.h',
116 'net/network_change_notifier_factory_cast.cc',
117 'net/network_change_notifier_factory_cast.h',
123 'target_name': 'cast_shell_resources',
126 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chromecast',
130 'action_name': 'cast_shell_resources',
132 'grit_grd_file': 'app/resources/shell_resources.grd',
133 'grit_resource_ids': 'app/resources/resource_ids',
135 'includes': [ '../build/grit_action.gypi' ],
138 'includes': [ '../build/grit_target.gypi' ],
141 'target_name': 'cast_shell_pak',
144 'cast_shell_resources',
145 '../content/app/resources/content_resources.gyp:content_resources',
146 '../content/app/strings/content_strings.gyp:content_strings',
147 '../net/net.gyp:net_resources',
148 '../third_party/WebKit/public/blink_resources.gyp:blink_resources',
149 '../ui/resources/ui_resources.gyp:ui_resources',
150 '../ui/strings/ui_strings.gyp:ui_strings',
154 'action_name': 'repack_cast_shell_pak',
157 '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_resources.pak',
158 '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_image_resources_100_percent.pak',
159 '<(SHARED_INTERMEDIATE_DIR)/chromecast/shell_resources.pak',
160 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
161 '<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_100_percent.pak',
162 '<(SHARED_INTERMEDIATE_DIR)/content/app/strings/content_strings_en-US.pak',
163 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
164 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percent.pak',
165 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/webui_resources.pak',
166 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/app_locale_settings_en-US.pak',
167 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/ui_strings_en-US.pak',
170 ['chromecast_branding=="Chrome" and use_chromecast_webui==1', {
172 '<(SHARED_INTERMEDIATE_DIR)/chromecast/app_resources.pak',
173 '<(SHARED_INTERMEDIATE_DIR)/chromecast/cast_webui_resources.pak',
177 'pak_output': '<(PRODUCT_DIR)/assets/cast_shell.pak',
179 'includes': [ '../build/repack_action.gypi' ],
183 ['chromecast_branding=="Chrome" and use_chromecast_webui==1', {
185 'internal/chromecast_resources.gyp:chromecast_app_resources',
186 'internal/chromecast_resources.gyp:chromecast_webui_resources',
190 }, # end of target 'cast_shell_pak'
191 # This target contains all content-embedder implementation that is
192 # non-platform-specific.
194 'target_name': 'cast_shell_common',
195 'type': '<(component)',
201 'cast_shell_resources',
203 'cast_version_header',
204 'chromecast_locales.gyp:chromecast_locales_pak',
205 'chromecast_locales.gyp:chromecast_settings',
206 'media/media.gyp:media_base',
207 'media/media.gyp:media_cdm',
208 '../base/base.gyp:base',
209 '../components/components.gyp:breakpad_host',
210 '../components/components.gyp:cdm_renderer',
211 '../components/components.gyp:component_metrics_proto',
212 '../components/components.gyp:crash_component',
213 '../components/components.gyp:devtools_discovery',
214 '../components/components.gyp:devtools_http_handler',
215 '../components/components.gyp:network_hints_browser',
216 '../components/components.gyp:network_hints_renderer',
217 '../components/components.gyp:metrics',
218 '../components/components.gyp:metrics_gpu',
219 '../components/components.gyp:metrics_net',
220 '../components/components.gyp:metrics_profiler',
221 '../content/content.gyp:content',
222 '../content/content.gyp:content_app_both',
223 '../skia/skia.gyp:skia',
224 '../third_party/WebKit/public/blink.gyp:blink',
225 '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
228 'app/cast_main_delegate.cc',
229 'app/cast_main_delegate.h',
230 'browser/cast_browser_context.cc',
231 'browser/cast_browser_context.h',
232 'browser/cast_browser_main_parts.cc',
233 'browser/cast_browser_main_parts.h',
234 'browser/cast_browser_process.cc',
235 'browser/cast_browser_process.h',
236 'browser/cast_content_browser_client.cc',
237 'browser/cast_content_browser_client.h',
238 'browser/cast_content_window.cc',
239 'browser/cast_content_window.h',
240 'browser/cast_download_manager_delegate.cc',
241 'browser/cast_download_manager_delegate.h',
242 'browser/cast_http_user_agent_settings.cc',
243 'browser/cast_http_user_agent_settings.h',
244 'browser/cast_network_delegate.cc',
245 'browser/cast_network_delegate.h',
246 'browser/cast_permission_manager.cc',
247 'browser/cast_permission_manager.h',
248 'browser/cast_quota_permission_context.cc',
249 'browser/cast_quota_permission_context.h',
250 'browser/cast_resource_dispatcher_host_delegate.cc',
251 'browser/cast_resource_dispatcher_host_delegate.h',
252 'browser/devtools/cast_dev_tools_delegate.cc',
253 'browser/devtools/cast_dev_tools_delegate.h',
254 'browser/devtools/remote_debugging_server.cc',
255 'browser/devtools/remote_debugging_server.h',
256 'browser/geolocation/cast_access_token_store.cc',
257 'browser/geolocation/cast_access_token_store.h',
258 'browser/media/cast_media_client_android.cc',
259 'browser/media/cast_media_client_android.h',
260 'browser/metrics/cast_metrics_prefs.cc',
261 'browser/metrics/cast_metrics_prefs.h',
262 'browser/metrics/cast_metrics_service_client.cc',
263 'browser/metrics/cast_metrics_service_client.h',
264 'browser/metrics/cast_stability_metrics_provider.cc',
265 'browser/metrics/cast_stability_metrics_provider.h',
266 'browser/metrics/platform_metrics_providers.h',
267 'browser/pref_service_helper.cc',
268 'browser/pref_service_helper.h',
269 'browser/service/cast_service.cc',
270 'browser/service/cast_service.h',
271 'browser/url_request_context_factory.cc',
272 'browser/url_request_context_factory.h',
273 'common/cast_content_client.cc',
274 'common/cast_content_client.h',
275 'common/cast_resource_delegate.cc',
276 'common/cast_resource_delegate.h',
277 'common/media/cast_messages.h',
278 'common/media/cast_message_generator.cc',
279 'common/media/cast_message_generator.h',
280 'common/platform_client_auth.h',
281 'common/pref_names.cc',
282 'common/pref_names.h',
283 'renderer/cast_content_renderer_client.cc',
284 'renderer/cast_content_renderer_client.h',
285 'renderer/cast_media_load_deferrer.cc',
286 'renderer/cast_media_load_deferrer.h',
287 'renderer/cast_render_process_observer.cc',
288 'renderer/cast_render_process_observer.h',
289 'renderer/key_systems_cast.cc',
290 'renderer/key_systems_cast.h',
291 'renderer/media/capabilities_message_filter.cc',
292 'renderer/media/capabilities_message_filter.h',
295 ['chromecast_branding=="Chrome"', {
297 'internal/chromecast_internal.gyp:cast_shell_internal',
301 'browser/cast_content_browser_client_simple.cc',
302 'browser/cast_network_delegate_simple.cc',
303 'browser/devtools/remote_debugging_server_simple.cc',
304 'browser/metrics/platform_metrics_providers_simple.cc',
305 'browser/pref_service_helper_simple.cc',
306 'common/platform_client_auth_simple.cc',
307 'renderer/cast_content_renderer_client_simple.cc',
308 'renderer/key_systems_cast_simple.cc',
313 'browser/service/cast_service_android.cc',
314 'browser/service/cast_service_android.h',
318 'browser/media/cast_browser_cdm_factory_simple.cc',
319 'browser/service/cast_service_simple.cc',
320 'browser/service/cast_service_simple.h',
325 # ExternalMetrics not necessary on Android and (as of this writing) uses
326 # non-portable filesystem operations. Also webcrypto is not used on
330 'browser/metrics/external_metrics.cc',
331 'browser/metrics/external_metrics.h',
334 '../components/components.gyp:metrics_serialization',
335 '../ui/aura/aura.gyp:aura_test_support',
340 '../components/components.gyp:cdm_browser',
346 'target_name': 'cast_sys_info',
347 'type': '<(component)',
350 '../base/base.gyp:base',
353 'base/cast_sys_info_util.h',
354 'base/cast_sys_info_dummy.cc',
355 'base/cast_sys_info_dummy.h',
358 ['chromecast_branding!="Chrome" and OS!="android"', {
360 'base/cast_sys_info_util_simple.cc',
364 }, # end of target 'cast_sys_info'
366 'target_name': 'cast_version_header',
368 'direct_dependent_settings': {
370 '<(SHARED_INTERMEDIATE_DIR)',
375 'action_name': 'version_header',
376 'message': 'Generating version header file: <@(_outputs)',
382 '<(SHARED_INTERMEDIATE_DIR)/chromecast/base/version.h',
386 '<(version_py_path)',
387 '-e', 'VERSION_FULL="<(version_full)"',
388 # CAST_BUILD_INCREMENTAL is taken from buildbot if available;
389 # otherwise, a dev string is used.
390 '-e', 'CAST_BUILD_INCREMENTAL="<!(echo ${CAST_BUILD_INCREMENTAL:="<!(date +%Y%m%d.%H%M%S)"})"',
391 # CAST_BUILD_RELEASE is taken from cast_build_release file if exist;
392 # otherwise, a dev string is used.
393 '-e', 'CAST_BUILD_RELEASE="<!(if test -f <(cast_build_release); then cat <(cast_build_release); else echo eng.${USER}; fi)"',
394 '-e', 'CAST_IS_DEBUG_BUILD=1 if "<(CONFIGURATION_NAME)" == "Debug" or <(cast_is_debug_build) == 1 else 0',
395 '-e', 'CAST_PRODUCT_TYPE=<(cast_product_type)',
400 '../build/util/version.gypi',
407 # Targets for Android receiver.
412 'target_name': 'cast_shell_icudata',
415 '../third_party/icu/icu.gyp:icudata',
416 '../v8/tools/gyp/v8.gyp:v8_external_snapshot',
419 'destination': '<(PRODUCT_DIR)/assets',
421 '<(PRODUCT_DIR)/icudtl.dat',
422 '<(PRODUCT_DIR)/natives_blob.bin',
423 '<(PRODUCT_DIR)/snapshot_blob.bin',
428 'target_name': 'libcast_shell_android',
429 'type': 'shared_library',
433 'cast_shell_icudata',
435 'cast_version_header',
436 '../base/base.gyp:base',
437 '../breakpad/breakpad.gyp:breakpad_client',
438 '../components/components.gyp:breakpad_host',
439 '../components/components.gyp:crash_component',
440 '../components/components.gyp:external_video_surface',
441 '../content/content.gyp:content',
442 '../skia/skia.gyp:skia',
443 '../ui/gfx/gfx.gyp:gfx',
444 '../ui/gl/gl.gyp:gl',
450 'base/cast_sys_info_android.cc',
451 'base/cast_sys_info_android.h',
452 'android/cast_jni_registrar.cc',
453 'android/cast_jni_registrar.h',
454 'android/cast_metrics_helper_android.cc',
455 'android/cast_metrics_helper_android.h',
456 'android/chromecast_config_android.cc',
457 'android/chromecast_config_android.h',
458 'android/platform_jni_loader.h',
459 'app/android/cast_jni_loader.cc',
460 'browser/android/cast_window_android.cc',
461 'browser/android/cast_window_android.h',
462 'browser/android/cast_window_manager.cc',
463 'browser/android/cast_window_manager.h',
464 'crash/android/cast_crash_reporter_client_android.cc',
465 'crash/android/cast_crash_reporter_client_android.h',
466 'crash/android/crash_handler.cc',
467 'crash/android/crash_handler.h',
470 ['chromecast_branding=="Chrome"', {
472 'internal/chromecast_internal.gyp:cast_shell_android_internal'
476 'android/chromecast_config_android_stub.cc',
477 'android/platform_jni_loader_stub.cc',
481 }, # end of target 'libcast_shell_android'
483 'target_name': 'cast_shell_java',
486 '<(android_support_v13_target)',
487 '../base/base.gyp:base_java',
488 '../content/content.gyp:content_java',
489 '../media/media.gyp:media_java',
490 '../net/net.gyp:net_java',
491 '../ui/android/ui_android.gyp:ui_java',
494 'has_java_resources': 1,
495 'java_in_dir': 'browser/android/apk',
496 'resource_dir': 'browser/android/apk/res',
497 'R_package': 'org.chromium.chromecast.shell',
499 'includes': ['../build/java.gypi'],
500 }, # end of target 'cast_shell_java'
502 'target_name': 'cast_shell_manifest',
505 'jinja_inputs': ['browser/android/apk/AndroidManifest.xml.jinja2'],
506 'jinja_output': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
508 'includes': [ '../build/android/jinja_template.gypi' ],
511 'target_name': 'cast_shell_apk',
515 'libcast_shell_android',
518 'apk_name': 'CastShell',
519 'manifest_package_name': 'org.chromium.chromecast.shell',
520 # Note(gunsch): there are no Java files in the android/ directory.
521 # Unfortunately, the java_apk.gypi target rigidly insists on having
522 # a java_in_dir directory, but complains about duplicate classes
523 # from the common cast_shell_java target (shared with internal APK)
524 # if the actual Java path is used.
525 # This will hopefully be removable after the great GN migration.
526 'java_in_dir': 'android',
527 'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
528 'package_name': 'org.chromium.chromecast.shell',
529 'native_lib_target': 'libcast_shell_android',
530 'asset_location': '<(PRODUCT_DIR)/assets',
531 'additional_input_paths': ['<(PRODUCT_DIR)/assets/cast_shell.pak'],
533 'includes': [ '../build/java_apk.gypi' ],
536 'target_name': 'cast_jni_headers',
539 'browser/android/apk/src/org/chromium/chromecast/shell/CastCrashHandler.java',
540 'browser/android/apk/src/org/chromium/chromecast/shell/CastMetricsHelper.java',
541 'browser/android/apk/src/org/chromium/chromecast/shell/CastSysInfoAndroid.java',
542 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java',
543 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowManager.java',
545 'direct_dependent_settings': {
547 '<(SHARED_INTERMEDIATE_DIR)/chromecast',
551 'jni_gen_package': 'chromecast',
553 'includes': [ '../build/jni_generator.gypi' ],
556 }, { # OS != "android"
559 'target_name': 'cast_shell_media',
560 'type': '<(component)',
562 'media/media.gyp:cast_media',
563 '../content/content.gyp:content',
564 '../ipc/ipc.gyp:ipc',
565 '../media/media.gyp:media',
568 'browser/media/cast_browser_cdm_factory.cc',
569 'browser/media/cast_browser_cdm_factory.h',
570 'browser/media/cma_message_filter_host.cc',
571 'browser/media/cma_message_filter_host.h',
572 'browser/media/cma_message_loop.cc',
573 'browser/media/cma_message_loop.h',
574 'browser/media/media_pipeline_host.cc',
575 'browser/media/media_pipeline_host.h',
576 'common/media/cma_ipc_common.h',
577 'common/media/cma_messages.h',
578 'common/media/cma_message_generator.cc',
579 'common/media/cma_message_generator.h',
580 'common/media/cma_param_traits.cc',
581 'common/media/cma_param_traits.h',
582 'common/media/shared_memory_chunk.cc',
583 'common/media/shared_memory_chunk.h',
584 'renderer/media/audio_pipeline_proxy.cc',
585 'renderer/media/audio_pipeline_proxy.h',
586 'renderer/media/chromecast_media_renderer_factory.cc',
587 'renderer/media/chromecast_media_renderer_factory.h',
588 'renderer/media/cma_message_filter_proxy.cc',
589 'renderer/media/cma_message_filter_proxy.h',
590 'renderer/media/media_channel_proxy.cc',
591 'renderer/media/media_channel_proxy.h',
592 'renderer/media/media_pipeline_proxy.cc',
593 'renderer/media/media_pipeline_proxy.h',
594 'renderer/media/video_pipeline_proxy.cc',
595 'renderer/media/video_pipeline_proxy.h',
597 }, # end of target 'cast_shell_media'
598 # This target contains all of the primary code of |cast_shell|, except
599 # for |main|. This allows end-to-end tests using |cast_shell|.
600 # This also includes all targets that cannot be built on Android.
602 'target_name': 'cast_shell_core',
603 'type': '<(component)',
607 'media/media.gyp:cast_media',
610 ['ozone_platform_egltest==1', {
612 '../ui/ozone/ozone.gyp:eglplatform_shim_x11',
618 'target_name': 'cast_shell',
619 'type': 'executable',
627 # Allow OEMs to override default libraries that are shipped with
628 # cast receiver package by installed OEM-specific libraries in
630 '-Wl,-rpath=/oem_cast_shlib',
631 # TODO(dougsteed): remove when Chromecast moves to boringssl.
632 # Allow the cast shell to find the NSS module in the same
634 '-Wl,-rpath=\$$ORIGIN'
639 ['enable_default_cast_graphics==1', {
642 'target_name': 'libcast_graphics_1.0',
643 'type': 'shared_library',
648 'graphics/cast_egl_platform_default.cc',
649 'graphics/graphics_properties_default.cc',
650 'graphics/osd_plane_default.cc'
655 ], # end of conditions