Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / chromecast / chromecast.gyp
blob432c396cf4689fec8b9c760fb1b13fc5b732e764
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.
6   'variables': {
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
13     'chromium_code': 1,
14     'chromecast_branding%': 'public',
15     'disable_display%': 0,
16     'enable_default_cast_graphics%': 1,
17     'ozone_platform_cast%': 0,
18     'use_chromecast_webui%': 0,
19   },
20   'includes': [
21     'chromecast_tests.gypi',
22   ],
23   'target_defaults': {
24     'include_dirs': [
25       '..',  # Root of Chromium checkout
26     ],
27     'conditions': [
28       ['disable_display==1', {
29         'defines': ['DISABLE_DISPLAY'],
30       }],
31     ],
32   },
33   'targets': [
34     # Public API target for OEM partners to replace shlibs.
35     {
36       'target_name': 'cast_public_api',
37       'type': '<(component)',
38       'sources': [
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',
59         'public/osd_plane.h',
60         'public/osd_plane_shlib.h',
61         'public/osd_surface.h',
62         'public/task_runner.h',
63         'public/video_plane.h',
64       ],
65       'direct_dependent_settings': {
66         'include_dirs': [
67           'public/',
68         ],
69       },
70     },
71     {
72       'target_name': 'cast_base',
73       'type': '<(component)',
74       'dependencies': [
75         '../base/base.gyp:base',
76       ],
77       'sources': [
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',
82         'base/cast_paths.cc',
83         'base/cast_paths.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',
90         'base/error_codes.h',
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',
96         'base/path_utils.cc',
97         'base/path_utils.h',
98         'base/pref_names.cc',
99         'base/pref_names.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',
108       ],
109       'conditions': [
110         ['OS=="android"', {
111           'dependencies': [
112             'cast_jni_headers',
113           ],
114         }],
115       ],
116     },  # end of target 'cast_base'
117     {
118       'target_name': 'cast_crash',
119       'type': '<(component)',
120       'include_dirs': [
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.
124         '../breakpad/src',
125       ],
126       'dependencies': [
127         'cast_base',
128         'cast_version_header',
129         '../breakpad/breakpad.gyp:breakpad_client',
130       ],
131       'sources': [
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',
151       ],
152     },  # end of target 'cast_crash'
153     {
154       'target_name': 'cast_crash_client',
155       'type': '<(component)',
156       'dependencies': [
157         'cast_crash',
158         '../breakpad/breakpad.gyp:breakpad_client',
159         '../components/components.gyp:crash_component',
160         '../content/content.gyp:content_common',
161       ],
162       'include_dirs': [
163         '../breakpad/src',
164       ],
165       'sources' : [
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',
172       ],
173       'conditions': [
174         ['OS=="android"', {
175           'dependencies': [
176             'cast_jni_headers',
177           ],
178         }],
179       ],
180     },  # end of target 'cast_crash_client'
181     {
182       'target_name': 'cast_crypto',
183       'type': '<(component)',
184       'dependencies': [
185         '../base/base.gyp:base',
186       ],
187       'sources': [
188         'crypto/signature_cache.cc',
189         'crypto/signature_cache.h',
190       ],
191     },
192     {
193       'target_name': 'cast_net',
194       'type': '<(component)',
195       'sources': [
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',
206       ],
207       'conditions': [
208         ['OS!="android"', {
209           'sources': [
210             'net/network_change_notifier_factory_cast.cc',
211             'net/network_change_notifier_factory_cast.h',
212           ],
213         }],
214       ],
215     },
216     {
217       'target_name': 'cast_shell_resources',
218       'type': 'none',
219       'variables': {
220         'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chromecast',
221       },
222       'actions': [
223         {
224           'action_name': 'cast_shell_resources',
225           'variables': {
226             'grit_grd_file': 'app/resources/shell_resources.grd',
227             'grit_resource_ids': 'app/resources/resource_ids',
228           },
229           'includes': [ '../build/grit_action.gypi' ],
230         },
231       ],
232       'includes': [ '../build/grit_target.gypi' ],
233     },
234     {
235       'target_name': 'cast_shell_pak',
236       'type': 'none',
237       'dependencies': [
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',
245       ],
246       'actions': [
247         {
248           'action_name': 'repack_cast_shell_pak',
249           'variables': {
250             'pak_inputs': [
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',
262             ],
263             'conditions': [
264               ['chromecast_branding!="public" and use_chromecast_webui==1', {
265                 'pak_inputs': [
266                   '<(SHARED_INTERMEDIATE_DIR)/chromecast/app_resources.pak',
267                   '<(SHARED_INTERMEDIATE_DIR)/chromecast/cast_webui_resources.pak',
268                 ],
269               }],
270               ['chromecast_branding!="public"', {
271                 'pak_inputs': [
272                   '<(SHARED_INTERMEDIATE_DIR)/chromecast/sound_resources.pak',
273                 ],
274               }],
275             ],
276             'pak_output': '<(PRODUCT_DIR)/assets/cast_shell.pak',
277           },
278           'includes': [ '../build/repack_action.gypi' ],
279         },
280       ],
281       'conditions': [
282         ['chromecast_branding!="public" and use_chromecast_webui==1', {
283           'dependencies': [
284             'internal/chromecast_resources.gyp:chromecast_app_resources',
285             'internal/chromecast_resources.gyp:chromecast_webui_resources',
286           ],
287         }],
288         ['chromecast_branding!="public"', {
289           'dependencies': [
290             'internal/chromecast_resources.gyp:chromecast_sound_resources',
291           ],
292         }],
293       ],
294     },  # end of target 'cast_shell_pak'
295     # This target contains all content-embedder implementation that is
296     # non-platform-specific.
297     {
298       'target_name': 'cast_shell_common',
299       'type': '<(component)',
300       'dependencies': [
301         'cast_base',
302         'cast_crash_client',
303         'cast_net',
304         'cast_shell_pak',
305         'cast_shell_resources',
306         'cast_sys_info',
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',
330       ],
331       'sources': [
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',
402       ],
403       'conditions': [
404         ['chromecast_branding!="public"', {
405           'dependencies': [
406             'internal/chromecast_internal.gyp:cast_shell_internal',
407           ],
408         }, {
409           'sources': [
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',
416           ],
417           'conditions': [
418             ['OS!="android"', {
419               'sources': [
420                 'browser/media/cast_browser_cdm_factory_simple.cc',
421               ],
422             }],
423           ],
424         }],
425         # ExternalMetrics not necessary on Android and (as of this writing) uses
426         # non-portable filesystem operations. Also webcrypto is not used on
427         # Android either.
428         ['OS=="linux"', {
429           'sources': [
430             'browser/metrics/external_metrics.cc',
431             'browser/metrics/external_metrics.h',
432             'graphics/cast_screen.cc',
433             'graphics/cast_screen.h',
434           ],
435           'dependencies': [
436             '../components/components.gyp:metrics_serialization',
437           ],
438         }],
439         ['OS=="android"', {
440           'dependencies': [
441             '../components/components.gyp:cdm_browser',
442             '../components/components.gyp:external_video_surface',
443             'cast_jni_headers',
444           ],
445         }],
446       ],
447     },
448     {
449       'target_name': 'cast_sys_info',
450       'type': '<(component)',
451       'dependencies': [
452         'cast_public_api',
453         '../base/base.gyp:base',
454       ],
455       'sources': [
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',
461       ],
462       'conditions': [
463         ['OS=="android"', {
464           'dependencies': [
465             'cast_jni_headers',
466           ],
467         }],
468         ['chromecast_branding=="public" and OS!="android"', {
469           'sources': [
470             'base/cast_sys_info_util_simple.cc',
471           ],
472         }],
473       ],
474     },  # end of target 'cast_sys_info'
475     {
476       'target_name': 'cast_version_header',
477       'type': 'none',
478       'direct_dependent_settings': {
479         'include_dirs': [
480           '<(SHARED_INTERMEDIATE_DIR)',
481         ],
482       },
483       'actions': [
484         {
485           'action_name': 'version_header',
486           'message': 'Generating version header file: <@(_outputs)',
487           'inputs': [
488             '<(version_path)',
489             'base/version.h.in',
490           ],
491           'outputs': [
492             '<(SHARED_INTERMEDIATE_DIR)/chromecast/base/version.h',
493           ],
494           'action': [
495             'python',
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)',
506             'base/version.h.in',
507             '<@(_outputs)',
508           ],
509           'includes': [
510             '../build/util/version.gypi',
511           ],
512         },
513       ],
514     },
515   ],  # end of targets
517   # Targets for Android receiver.
518   'conditions': [
519     ['OS=="android"', {
520       'targets': [
521         {
522           'target_name': 'cast_shell_icudata',
523           'type': 'none',
524           'dependencies': [
525             '../third_party/icu/icu.gyp:icudata',
526             '../v8/tools/gyp/v8.gyp:v8_external_snapshot',
527           ],
528           'copies': [{
529             'destination': '<(PRODUCT_DIR)/assets',
530             'files': [
531               '<(PRODUCT_DIR)/icudtl.dat',
532               '<(PRODUCT_DIR)/natives_blob.bin',
533               '<(PRODUCT_DIR)/snapshot_blob.bin',
534             ],
535           }],
536         },
537         {
538           'target_name': 'libcast_shell_android',
539           'type': 'shared_library',
540           'dependencies': [
541             'cast_jni_headers',
542             'cast_shell_common',
543             'cast_shell_icudata',
544             'cast_shell_pak',
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',
552           ],
553           'sources': [
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',
560           ],
561           'conditions': [
562             ['chromecast_branding!="public"', {
563               'dependencies': [
564                 'internal/chromecast_internal.gyp:cast_shell_android_internal'
565               ],
566             }, {
567               'sources': [
568                 'android/platform_jni_loader_stub.cc',
569               ],
570             }]
571           ],
572         },  # end of target 'libcast_shell_android'
573         {
574           'target_name': 'cast_base_java',
575           'type': 'none',
576           'dependencies': [
577             '../base/base.gyp:base_java',
578           ],
579           'variables': {
580             'android_manifest_path': 'android/AndroidManifest.xml',
581             'java_in_dir': 'base/java',
582           },
583           'includes': ['../build/java.gypi'],
584         },  # end of target 'cast_base_java'
585         {
586           'target_name': 'cast_shell_java',
587           'type': 'none',
588           'dependencies': [
589             '<(android_support_v13_target)',
590             'cast_base_java',
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',
598           ],
599           'variables': {
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',
605           },
606           'includes': ['../build/java.gypi'],
607         },  # end of target 'cast_shell_java'
608         {
609           'target_name': 'cast_shell_manifest',
610           'type': 'none',
611           'variables': {
612             'jinja_inputs': ['browser/android/apk/AndroidManifest.xml.jinja2'],
613             'jinja_output': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
614           },
615           'includes': [ '../build/android/jinja_template.gypi' ],
616         },
617         {
618           'target_name': 'cast_shell_apk',
619           'type': 'none',
620           'dependencies': [
621             'cast_shell_java',
622             'libcast_shell_android',
623           ],
624           'variables': {
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'],
639           },
640           'includes': [ '../build/java_apk.gypi' ],
641         },
642         {
643           'target_name': 'cast_jni_headers',
644           'type': 'none',
645           'sources': [
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',
654           ],
655           'direct_dependent_settings': {
656             'include_dirs': [
657               '<(SHARED_INTERMEDIATE_DIR)/chromecast',
658             ],
659           },
660           'variables': {
661             'jni_gen_package': 'chromecast',
662           },
663           'includes': [ '../build/jni_generator.gypi' ],
664         },
665       ],  # end of targets
666     }, {  # OS != "android"
667       'targets': [
668         {
669           'target_name': 'cast_shell_media',
670           'type': '<(component)',
671           'dependencies': [
672             'cast_public_api',
673             'media/media.gyp:cast_media',
674             '../content/content.gyp:content',
675             '../ipc/ipc.gyp:ipc',
676             '../media/media.gyp:media',
677           ],
678           'sources': [
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',
707           ],
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.
712         {
713           'target_name': 'cast_shell_core',
714           'type': '<(component)',
715           'dependencies': [
716             'cast_shell_media',
717             'cast_shell_common',
718             'media/media.gyp:cast_media',
719           ],
720           'conditions': [
721             ['ozone_platform_egltest==1', {
722               'dependencies': [
723                 '../ui/ozone/ozone.gyp:eglplatform_shim_x11',
724               ],
725             }],
726           ],
727         },
728         {
729           'target_name': 'cast_shell',
730           'type': 'executable',
731           'dependencies': [
732             'cast_shell_core',
733           ],
734           'sources': [
735             'app/cast_main.cc',
736           ],
737           'ldflags': [
738             # Allow  OEMs to override default libraries that are shipped with
739             # cast receiver package by installed OEM-specific libraries in
740             # /oem_cast_shlib.
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
744             # directory.
745             '-Wl,-rpath=\$$ORIGIN'
746           ],
747         },
748       ],  # end of targets
749     }],
750     ['enable_default_cast_graphics==1', {
751       'targets': [
752         {
753           'target_name': 'libcast_graphics_1.0',
754           'type': 'shared_library',
755           'dependencies': [
756             'cast_public_api'
757           ],
758           'sources': [
759             'graphics/cast_egl_platform_default.cc',
760             'graphics/graphics_properties_default.cc',
761             'graphics/osd_plane_default.cc'
762           ],
763         }
764       ]
765     }],
766   ],  # end of conditions