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',
52 # TODO(gunsch): Remove this fake target once it's either added or no
53 # longer referenced from internal code.
54 {'target_name': 'cast_media_audio', 'type': 'none'},
57 'target_name': 'cast_base',
58 'type': '<(component)',
60 '../base/base.gyp:base',
65 'base/metrics/cast_histograms.h',
66 'base/metrics/cast_metrics_helper.cc',
67 'base/metrics/cast_metrics_helper.h',
68 'base/metrics/grouped_histogram.cc',
69 'base/metrics/grouped_histogram.h',
70 'base/serializers.cc',
73 }, # end of target 'cast_base'
75 'target_name': 'cast_crash_client',
76 'type': '<(component)',
78 '../breakpad/breakpad.gyp:breakpad_client',
79 '../components/components.gyp:crash_component',
82 'crash/cast_crash_keys.cc',
83 'crash/cast_crash_keys.h',
84 'crash/cast_crash_reporter_client.cc',
85 'crash/cast_crash_reporter_client.h',
88 ['chromecast_branding=="Chrome"', {
90 'internal/chromecast_internal.gyp:crash_internal',
94 'crash/cast_crash_reporter_client_simple.cc',
98 }, # end of target 'cast_crash_client'
100 'target_name': 'cast_net',
101 'type': '<(component)',
103 'net/connectivity_checker.cc',
104 'net/connectivity_checker.h',
105 'net/net_switches.cc',
106 'net/net_switches.h',
107 'net/net_util_cast.cc',
108 'net/net_util_cast.h',
113 'net/network_change_notifier_factory_cast.cc',
114 'net/network_change_notifier_factory_cast.h',
120 'target_name': 'cast_shell_resources',
123 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chromecast',
127 'action_name': 'cast_shell_resources',
129 'grit_grd_file': 'app/resources/shell_resources.grd',
130 'grit_resource_ids': 'app/resources/resource_ids',
132 'includes': [ '../build/grit_action.gypi' ],
135 'includes': [ '../build/grit_target.gypi' ],
138 'target_name': 'cast_shell_pak',
141 'cast_shell_resources',
142 '../content/app/resources/content_resources.gyp:content_resources',
143 '../content/app/strings/content_strings.gyp:content_strings',
144 '../net/net.gyp:net_resources',
145 '../third_party/WebKit/public/blink_resources.gyp:blink_resources',
146 '../ui/resources/ui_resources.gyp:ui_resources',
147 '../ui/strings/ui_strings.gyp:ui_strings',
151 'action_name': 'repack_cast_shell_pak',
154 '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_resources.pak',
155 '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_image_resources_100_percent.pak',
156 '<(SHARED_INTERMEDIATE_DIR)/chromecast/shell_resources.pak',
157 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
158 '<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_100_percent.pak',
159 '<(SHARED_INTERMEDIATE_DIR)/content/app/strings/content_strings_en-US.pak',
160 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
161 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percent.pak',
162 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/webui_resources.pak',
163 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/app_locale_settings_en-US.pak',
164 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/ui_strings_en-US.pak',
167 ['chromecast_branding=="Chrome" and use_chromecast_webui==1', {
169 '<(SHARED_INTERMEDIATE_DIR)/chromecast/app_resources.pak',
170 '<(SHARED_INTERMEDIATE_DIR)/chromecast/cast_webui_resources.pak',
174 'pak_output': '<(PRODUCT_DIR)/assets/cast_shell.pak',
176 'includes': [ '../build/repack_action.gypi' ],
180 ['chromecast_branding=="Chrome" and use_chromecast_webui==1', {
182 'internal/chromecast_resources.gyp:chromecast_app_resources',
183 'internal/chromecast_resources.gyp:chromecast_webui_resources',
187 }, # end of target 'cast_shell_pak'
188 # This target contains all content-embedder implementation that is
189 # non-platform-specific.
191 'target_name': 'cast_shell_common',
192 'type': '<(component)',
198 'cast_shell_resources',
200 'cast_version_header',
201 'chromecast_locales.gyp:chromecast_locales_pak',
202 'chromecast_locales.gyp:chromecast_settings',
203 'media/media.gyp:media_base',
204 'media/media.gyp:media_cdm',
205 '../base/base.gyp:base',
206 '../components/components.gyp:breakpad_host',
207 '../components/components.gyp:cdm_renderer',
208 '../components/components.gyp:component_metrics_proto',
209 '../components/components.gyp:crash_component',
210 '../components/components.gyp:devtools_discovery',
211 '../components/components.gyp:devtools_http_handler',
212 '../components/components.gyp:network_hints_browser',
213 '../components/components.gyp:network_hints_renderer',
214 '../components/components.gyp:metrics',
215 '../components/components.gyp:metrics_gpu',
216 '../components/components.gyp:metrics_net',
217 '../components/components.gyp:metrics_profiler',
218 '../content/content.gyp:content',
219 '../content/content.gyp:content_app_both',
220 '../skia/skia.gyp:skia',
221 '../third_party/WebKit/public/blink.gyp:blink',
222 '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
225 'app/cast_main_delegate.cc',
226 'app/cast_main_delegate.h',
227 'browser/cast_browser_context.cc',
228 'browser/cast_browser_context.h',
229 'browser/cast_browser_main_parts.cc',
230 'browser/cast_browser_main_parts.h',
231 'browser/cast_browser_process.cc',
232 'browser/cast_browser_process.h',
233 'browser/cast_content_browser_client.cc',
234 'browser/cast_content_browser_client.h',
235 'browser/cast_content_window.cc',
236 'browser/cast_content_window.h',
237 'browser/cast_download_manager_delegate.cc',
238 'browser/cast_download_manager_delegate.h',
239 'browser/cast_http_user_agent_settings.cc',
240 'browser/cast_http_user_agent_settings.h',
241 'browser/cast_network_delegate.cc',
242 'browser/cast_network_delegate.h',
243 'browser/cast_permission_manager.cc',
244 'browser/cast_permission_manager.h',
245 'browser/cast_quota_permission_context.cc',
246 'browser/cast_quota_permission_context.h',
247 'browser/cast_resource_dispatcher_host_delegate.cc',
248 'browser/cast_resource_dispatcher_host_delegate.h',
249 'browser/devtools/cast_dev_tools_delegate.cc',
250 'browser/devtools/cast_dev_tools_delegate.h',
251 'browser/devtools/remote_debugging_server.cc',
252 'browser/devtools/remote_debugging_server.h',
253 'browser/geolocation/cast_access_token_store.cc',
254 'browser/geolocation/cast_access_token_store.h',
255 'browser/media/cast_media_client_android.cc',
256 'browser/media/cast_media_client_android.h',
257 'browser/metrics/cast_metrics_prefs.cc',
258 'browser/metrics/cast_metrics_prefs.h',
259 'browser/metrics/cast_metrics_service_client.cc',
260 'browser/metrics/cast_metrics_service_client.h',
261 'browser/metrics/cast_stability_metrics_provider.cc',
262 'browser/metrics/cast_stability_metrics_provider.h',
263 'browser/metrics/platform_metrics_providers.h',
264 'browser/pref_service_helper.cc',
265 'browser/pref_service_helper.h',
266 'browser/service/cast_service.cc',
267 'browser/service/cast_service.h',
268 'browser/url_request_context_factory.cc',
269 'browser/url_request_context_factory.h',
270 'common/cast_content_client.cc',
271 'common/cast_content_client.h',
272 'common/cast_resource_delegate.cc',
273 'common/cast_resource_delegate.h',
274 'common/chromecast_switches.cc',
275 'common/chromecast_switches.h',
276 'common/media/cast_messages.h',
277 'common/media/cast_message_generator.cc',
278 'common/media/cast_message_generator.h',
279 'common/platform_client_auth.h',
280 'common/pref_names.cc',
281 'common/pref_names.h',
282 'renderer/cast_content_renderer_client.cc',
283 'renderer/cast_content_renderer_client.h',
284 'renderer/cast_media_load_deferrer.cc',
285 'renderer/cast_media_load_deferrer.h',
286 'renderer/cast_render_process_observer.cc',
287 'renderer/cast_render_process_observer.h',
288 'renderer/key_systems_cast.cc',
289 'renderer/key_systems_cast.h',
290 'renderer/media/capabilities_message_filter.cc',
291 'renderer/media/capabilities_message_filter.h',
294 ['chromecast_branding=="Chrome"', {
296 'internal/chromecast_internal.gyp:cast_shell_internal',
300 'browser/cast_content_browser_client_simple.cc',
301 'browser/cast_network_delegate_simple.cc',
302 'browser/devtools/remote_debugging_server_simple.cc',
303 'browser/metrics/platform_metrics_providers_simple.cc',
304 'browser/pref_service_helper_simple.cc',
305 'common/platform_client_auth_simple.cc',
306 'renderer/cast_content_renderer_client_simple.cc',
307 'renderer/key_systems_cast_simple.cc',
312 'browser/service/cast_service_android.cc',
313 'browser/service/cast_service_android.h',
317 'browser/media/cast_browser_cdm_factory_simple.cc',
318 'browser/service/cast_service_simple.cc',
319 'browser/service/cast_service_simple.h',
324 # ExternalMetrics not necessary on Android and (as of this writing) uses
325 # non-portable filesystem operations. Also webcrypto is not used on
329 'browser/metrics/external_metrics.cc',
330 'browser/metrics/external_metrics.h',
333 '../components/components.gyp:metrics_serialization',
334 '../ui/aura/aura.gyp:aura_test_support',
339 '../components/components.gyp:cdm_browser',
345 'target_name': 'cast_sys_info',
346 'type': '<(component)',
349 '../base/base.gyp:base',
352 'base/cast_sys_info_util.h',
353 'base/cast_sys_info_dummy.cc',
354 'base/cast_sys_info_dummy.h',
357 ['chromecast_branding!="Chrome"', {
359 'base/cast_sys_info_util_simple.cc',
363 }, # end of target 'cast_sys_info'
365 'target_name': 'cast_version_header',
367 'direct_dependent_settings': {
369 '<(SHARED_INTERMEDIATE_DIR)',
374 'action_name': 'version_header',
375 'message': 'Generating version header file: <@(_outputs)',
378 'common/version.h.in',
381 '<(SHARED_INTERMEDIATE_DIR)/chromecast/common/version.h',
385 '<(version_py_path)',
386 '-e', 'VERSION_FULL="<(version_full)"',
387 # CAST_BUILD_INCREMENTAL is taken from buildbot if available;
388 # otherwise, a dev string is used.
389 '-e', 'CAST_BUILD_INCREMENTAL="<!(echo ${CAST_BUILD_INCREMENTAL:="<!(date +%Y%m%d.%H%M%S)"})"',
390 # CAST_BUILD_RELEASE is taken from cast_build_release file if exist;
391 # otherwise, a dev string is used.
392 '-e', 'CAST_BUILD_RELEASE="<!(if test -f <(cast_build_release); then cat <(cast_build_release); else echo eng.${USER}; fi)"',
393 '-e', 'CAST_IS_DEBUG_BUILD=1 if "<(CONFIGURATION_NAME)" == "Debug" or <(cast_is_debug_build) == 1 else 0',
394 '-e', 'CAST_PRODUCT_TYPE=<(cast_product_type)',
395 'common/version.h.in',
399 '../build/util/version.gypi',
406 # Targets for Android receiver.
411 'target_name': 'cast_shell_icudata',
414 '../third_party/icu/icu.gyp:icudata',
415 '../v8/tools/gyp/v8.gyp:v8_external_snapshot',
418 'destination': '<(PRODUCT_DIR)/assets',
420 '<(PRODUCT_DIR)/icudtl.dat',
421 '<(PRODUCT_DIR)/natives_blob.bin',
422 '<(PRODUCT_DIR)/snapshot_blob.bin',
427 'target_name': 'libcast_shell_android',
428 'type': 'shared_library',
432 'cast_shell_icudata',
434 'cast_version_header',
435 '../base/base.gyp:base',
436 '../breakpad/breakpad.gyp:breakpad_client',
437 '../components/components.gyp:breakpad_host',
438 '../components/components.gyp:crash_component',
439 '../components/components.gyp:external_video_surface',
440 '../content/content.gyp:content',
441 '../skia/skia.gyp:skia',
442 '../ui/gfx/gfx.gyp:gfx',
443 '../ui/gl/gl.gyp:gl',
449 'android/cast_jni_registrar.cc',
450 'android/cast_jni_registrar.h',
451 'android/chromecast_config_android.cc',
452 'android/chromecast_config_android.h',
453 'android/platform_jni_loader.h',
454 'app/android/cast_jni_loader.cc',
455 'browser/android/cast_window_android.cc',
456 'browser/android/cast_window_android.h',
457 'browser/android/cast_window_manager.cc',
458 'browser/android/cast_window_manager.h',
459 'crash/android/cast_crash_reporter_client_android.cc',
460 'crash/android/cast_crash_reporter_client_android.h',
461 'crash/android/crash_handler.cc',
462 'crash/android/crash_handler.h',
465 ['chromecast_branding=="Chrome"', {
467 'internal/chromecast_internal.gyp:cast_shell_android_internal'
471 'android/chromecast_config_android_stub.cc',
472 'android/platform_jni_loader_stub.cc',
476 }, # end of target 'libcast_shell_android'
478 'target_name': 'cast_shell_java',
481 '<(android_support_v13_target)',
482 '../base/base.gyp:base_java',
483 '../content/content.gyp:content_java',
484 '../media/media.gyp:media_java',
485 '../net/net.gyp:net_java',
486 '../ui/android/ui_android.gyp:ui_java',
489 'has_java_resources': 1,
490 'java_in_dir': 'browser/android/apk',
491 'resource_dir': 'browser/android/apk/res',
492 'R_package': 'org.chromium.chromecast.shell',
494 'includes': ['../build/java.gypi'],
495 }, # end of target 'cast_shell_java'
497 'target_name': 'cast_shell_manifest',
500 'jinja_inputs': ['browser/android/apk/AndroidManifest.xml.jinja2'],
501 'jinja_output': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
503 'includes': [ '../build/android/jinja_template.gypi' ],
506 'target_name': 'cast_shell_apk',
510 'libcast_shell_android',
513 'apk_name': 'CastShell',
514 'manifest_package_name': 'org.chromium.chromecast.shell',
515 # Note(gunsch): there are no Java files in the android/ directory.
516 # Unfortunately, the java_apk.gypi target rigidly insists on having
517 # a java_in_dir directory, but complains about duplicate classes
518 # from the common cast_shell_java target (shared with internal APK)
519 # if the actual Java path is used.
520 # This will hopefully be removable after the great GN migration.
521 'java_in_dir': 'android',
522 'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
523 'package_name': 'org.chromium.chromecast.shell',
524 'native_lib_target': 'libcast_shell_android',
525 'asset_location': '<(PRODUCT_DIR)/assets',
526 'additional_input_paths': ['<(PRODUCT_DIR)/assets/cast_shell.pak'],
528 'includes': [ '../build/java_apk.gypi' ],
531 'target_name': 'cast_jni_headers',
534 'browser/android/apk/src/org/chromium/chromecast/shell/CastCrashHandler.java',
535 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java',
536 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowManager.java',
538 'direct_dependent_settings': {
540 '<(SHARED_INTERMEDIATE_DIR)/chromecast',
544 'jni_gen_package': 'chromecast',
546 'includes': [ '../build/jni_generator.gypi' ],
549 }, { # OS != "android"
552 'target_name': 'cast_shell_media',
553 'type': '<(component)',
555 'media/media.gyp:cast_media',
556 '../content/content.gyp:content',
557 '../ipc/ipc.gyp:ipc',
558 '../media/media.gyp:media',
561 'browser/media/cast_browser_cdm_factory.cc',
562 'browser/media/cast_browser_cdm_factory.h',
563 'browser/media/cma_message_filter_host.cc',
564 'browser/media/cma_message_filter_host.h',
565 'browser/media/cma_message_loop.cc',
566 'browser/media/cma_message_loop.h',
567 'browser/media/media_pipeline_host.cc',
568 'browser/media/media_pipeline_host.h',
569 'common/media/cma_ipc_common.h',
570 'common/media/cma_messages.h',
571 'common/media/cma_message_generator.cc',
572 'common/media/cma_message_generator.h',
573 'common/media/cma_param_traits.cc',
574 'common/media/cma_param_traits.h',
575 'common/media/shared_memory_chunk.cc',
576 'common/media/shared_memory_chunk.h',
577 'renderer/media/audio_pipeline_proxy.cc',
578 'renderer/media/audio_pipeline_proxy.h',
579 'renderer/media/chromecast_media_renderer_factory.cc',
580 'renderer/media/chromecast_media_renderer_factory.h',
581 'renderer/media/cma_message_filter_proxy.cc',
582 'renderer/media/cma_message_filter_proxy.h',
583 'renderer/media/media_channel_proxy.cc',
584 'renderer/media/media_channel_proxy.h',
585 'renderer/media/media_pipeline_proxy.cc',
586 'renderer/media/media_pipeline_proxy.h',
587 'renderer/media/video_pipeline_proxy.cc',
588 'renderer/media/video_pipeline_proxy.h',
590 }, # end of target 'cast_shell_media'
591 # This target contains all of the primary code of |cast_shell|, except
592 # for |main|. This allows end-to-end tests using |cast_shell|.
593 # This also includes all targets that cannot be built on Android.
595 'target_name': 'cast_shell_core',
596 'type': '<(component)',
600 'media/media.gyp:cast_media',
603 ['ozone_platform_egltest==1', {
605 '../ui/ozone/ozone.gyp:eglplatform_shim_x11',
611 'target_name': 'cast_shell',
612 'type': 'executable',
620 # Allow OEMs to override default libraries that are shipped with
621 # cast receiver package by installed OEM-specific libraries in
623 '-Wl,-rpath=/oem_cast_shlib',
624 # TODO(dougsteed): remove when Chromecast moves to boringssl.
625 # Allow the cast shell to find the NSS module in the same
627 '-Wl,-rpath=\$$ORIGIN'
632 ['enable_default_cast_graphics==1', {
635 'target_name': 'libcast_graphics_1.0',
636 'type': 'shared_library',
641 'graphics/cast_egl_platform_default.cc',
642 'graphics/graphics_properties_default.cc',
643 'graphics/osd_plane_default.cc'
648 ], # end of conditions