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_sys_info.h',
42 'public/chromecast_export.h',
43 'public/graphics_properties_shlib.h'
46 # TODO(gunsch): Remove this fake target once it's either added or no
47 # longer referenced from internal code.
48 {'target_name': 'cast_media_audio', 'type': 'none'},
51 'target_name': 'cast_base',
52 'type': '<(component)',
54 '../base/base.gyp:base',
59 'base/metrics/cast_histograms.h',
60 'base/metrics/cast_metrics_helper.cc',
61 'base/metrics/cast_metrics_helper.h',
62 'base/metrics/grouped_histogram.cc',
63 'base/metrics/grouped_histogram.h',
64 'base/serializers.cc',
67 }, # end of target 'cast_base'
69 'target_name': 'cast_crash_client',
70 'type': '<(component)',
72 '../breakpad/breakpad.gyp:breakpad_client',
73 '../components/components.gyp:crash_component',
76 'crash/cast_crash_keys.cc',
77 'crash/cast_crash_keys.h',
78 'crash/cast_crash_reporter_client.cc',
79 'crash/cast_crash_reporter_client.h',
82 ['chromecast_branding=="Chrome"', {
84 'internal/chromecast_internal.gyp:crash_internal',
88 'crash/cast_crash_reporter_client_simple.cc',
92 }, # end of target 'cast_crash_client'
94 'target_name': 'cast_net',
95 'type': '<(component)',
97 'net/connectivity_checker.cc',
98 'net/connectivity_checker.h',
99 'net/net_switches.cc',
100 'net/net_switches.h',
104 'target_name': 'cast_shell_resources',
107 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chromecast',
111 'action_name': 'cast_shell_resources',
113 'grit_grd_file': 'app/resources/shell_resources.grd',
114 'grit_resource_ids': 'app/resources/resource_ids',
116 'includes': [ '../build/grit_action.gypi' ],
119 'includes': [ '../build/grit_target.gypi' ],
122 'target_name': 'cast_shell_pak',
125 'cast_shell_resources',
126 '../content/app/resources/content_resources.gyp:content_resources',
127 '../content/app/strings/content_strings.gyp:content_strings',
128 '../net/net.gyp:net_resources',
129 '../third_party/WebKit/public/blink_resources.gyp:blink_resources',
130 '../ui/resources/ui_resources.gyp:ui_resources',
131 '../ui/strings/ui_strings.gyp:ui_strings',
135 'action_name': 'repack_cast_shell_pak',
138 '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_resources.pak',
139 '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_image_resources_100_percent.pak',
140 '<(SHARED_INTERMEDIATE_DIR)/chromecast/shell_resources.pak',
141 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
142 '<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_100_percent.pak',
143 '<(SHARED_INTERMEDIATE_DIR)/content/app/strings/content_strings_en-US.pak',
144 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
145 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percent.pak',
146 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/webui_resources.pak',
147 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/app_locale_settings_en-US.pak',
148 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/ui_strings_en-US.pak',
151 ['chromecast_branding=="Chrome" and use_chromecast_webui==1', {
153 '<(SHARED_INTERMEDIATE_DIR)/chromecast/app_resources.pak',
154 '<(SHARED_INTERMEDIATE_DIR)/chromecast/cast_webui_resources.pak',
158 'pak_output': '<(PRODUCT_DIR)/assets/cast_shell.pak',
160 'includes': [ '../build/repack_action.gypi' ],
164 ['chromecast_branding=="Chrome" and use_chromecast_webui==1', {
166 'internal/chromecast_resources.gyp:chromecast_app_resources',
167 'internal/chromecast_resources.gyp:chromecast_webui_resources',
171 }, # end of target 'cast_shell_pak'
172 # This target contains all content-embedder implementation that is
173 # non-platform-specific.
175 'target_name': 'cast_shell_common',
176 'type': '<(component)',
182 'cast_shell_resources',
184 'cast_version_header',
185 'chromecast_locales.gyp:chromecast_locales_pak',
186 'chromecast_locales.gyp:chromecast_settings',
187 'media/media.gyp:media_base',
188 '../base/base.gyp:base',
189 '../components/components.gyp:breakpad_host',
190 '../components/components.gyp:cdm_renderer',
191 '../components/components.gyp:component_metrics_proto',
192 '../components/components.gyp:crash_component',
193 '../components/components.gyp:devtools_discovery',
194 '../components/components.gyp:devtools_http_handler',
195 '../components/components.gyp:network_hints_browser',
196 '../components/components.gyp:network_hints_renderer',
197 '../components/components.gyp:metrics',
198 '../components/components.gyp:metrics_gpu',
199 '../components/components.gyp:metrics_net',
200 '../components/components.gyp:metrics_profiler',
201 '../content/content.gyp:content',
202 '../content/content.gyp:content_app_both',
203 '../skia/skia.gyp:skia',
204 '../third_party/WebKit/public/blink.gyp:blink',
205 '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
208 'app/cast_main_delegate.cc',
209 'app/cast_main_delegate.h',
210 'browser/cast_browser_context.cc',
211 'browser/cast_browser_context.h',
212 'browser/cast_browser_main_parts.cc',
213 'browser/cast_browser_main_parts.h',
214 'browser/cast_browser_process.cc',
215 'browser/cast_browser_process.h',
216 'browser/cast_content_browser_client.cc',
217 'browser/cast_content_browser_client.h',
218 'browser/cast_content_window.cc',
219 'browser/cast_content_window.h',
220 'browser/cast_download_manager_delegate.cc',
221 'browser/cast_download_manager_delegate.h',
222 'browser/cast_http_user_agent_settings.cc',
223 'browser/cast_http_user_agent_settings.h',
224 'browser/cast_network_delegate.cc',
225 'browser/cast_network_delegate.h',
226 'browser/cast_permission_manager.cc',
227 'browser/cast_permission_manager.h',
228 'browser/cast_quota_permission_context.cc',
229 'browser/cast_quota_permission_context.h',
230 'browser/cast_resource_dispatcher_host_delegate.cc',
231 'browser/cast_resource_dispatcher_host_delegate.h',
232 'browser/devtools/cast_dev_tools_delegate.cc',
233 'browser/devtools/cast_dev_tools_delegate.h',
234 'browser/devtools/remote_debugging_server.cc',
235 'browser/devtools/remote_debugging_server.h',
236 'browser/geolocation/cast_access_token_store.cc',
237 'browser/geolocation/cast_access_token_store.h',
238 'browser/metrics/cast_metrics_prefs.cc',
239 'browser/metrics/cast_metrics_prefs.h',
240 'browser/metrics/cast_metrics_service_client.cc',
241 'browser/metrics/cast_metrics_service_client.h',
242 'browser/metrics/cast_stability_metrics_provider.cc',
243 'browser/metrics/cast_stability_metrics_provider.h',
244 'browser/metrics/platform_metrics_providers.h',
245 'browser/pref_service_helper.cc',
246 'browser/pref_service_helper.h',
247 'browser/service/cast_service.cc',
248 'browser/service/cast_service.h',
249 'browser/url_request_context_factory.cc',
250 'browser/url_request_context_factory.h',
251 'common/cast_content_client.cc',
252 'common/cast_content_client.h',
253 'common/cast_resource_delegate.cc',
254 'common/cast_resource_delegate.h',
255 'common/chromecast_switches.cc',
256 'common/chromecast_switches.h',
257 'common/media/cast_messages.h',
258 'common/media/cast_message_generator.cc',
259 'common/media/cast_message_generator.h',
260 'common/platform_client_auth.h',
261 'common/pref_names.cc',
262 'common/pref_names.h',
263 'renderer/cast_content_renderer_client.cc',
264 'renderer/cast_content_renderer_client.h',
265 'renderer/cast_media_load_deferrer.cc',
266 'renderer/cast_media_load_deferrer.h',
267 'renderer/cast_render_process_observer.cc',
268 'renderer/cast_render_process_observer.h',
269 'renderer/key_systems_cast.cc',
270 'renderer/key_systems_cast.h',
271 'renderer/media/capabilities_message_filter.cc',
272 'renderer/media/capabilities_message_filter.h',
275 ['chromecast_branding=="Chrome"', {
277 'internal/chromecast_internal.gyp:cast_shell_internal',
281 'browser/cast_content_browser_client_simple.cc',
282 'browser/cast_network_delegate_simple.cc',
283 'browser/devtools/remote_debugging_server_simple.cc',
284 'browser/metrics/platform_metrics_providers_simple.cc',
285 'browser/pref_service_helper_simple.cc',
286 'common/platform_client_auth_simple.cc',
287 'renderer/cast_content_renderer_client_simple.cc',
288 'renderer/key_systems_cast_simple.cc',
293 'browser/service/cast_service_android.cc',
294 'browser/service/cast_service_android.h',
298 'browser/media/cast_browser_cdm_factory_simple.cc',
299 'browser/service/cast_service_simple.cc',
300 'browser/service/cast_service_simple.h',
305 # ExternalMetrics not necessary on Android and (as of this writing) uses
306 # non-portable filesystem operations. Also webcrypto is not used on
310 'browser/metrics/external_metrics.cc',
311 'browser/metrics/external_metrics.h',
314 '../components/components.gyp:metrics_serialization',
315 '../ui/aura/aura.gyp:aura_test_support',
321 'target_name': 'cast_sys_info',
322 'type': '<(component)',
325 '../base/base.gyp:base',
328 'base/cast_sys_info_util.h',
329 'base/cast_sys_info_dummy.cc',
330 'base/cast_sys_info_dummy.h',
333 ['chromecast_branding!="Chrome"', {
335 'base/cast_sys_info_util_simple.cc',
339 }, # end of target 'cast_sys_info'
341 'target_name': 'cast_version_header',
343 'direct_dependent_settings': {
345 '<(SHARED_INTERMEDIATE_DIR)',
350 'action_name': 'version_header',
351 'message': 'Generating version header file: <@(_outputs)',
354 'common/version.h.in',
357 '<(SHARED_INTERMEDIATE_DIR)/chromecast/common/version.h',
361 '<(version_py_path)',
362 '-e', 'VERSION_FULL="<(version_full)"',
363 # CAST_BUILD_INCREMENTAL is taken from buildbot if available;
364 # otherwise, a dev string is used.
365 '-e', 'CAST_BUILD_INCREMENTAL="<!(echo ${CAST_BUILD_INCREMENTAL:="<!(date +%Y%m%d.%H%M%S)"})"',
366 # CAST_BUILD_RELEASE is taken from cast_build_release file if exist;
367 # otherwise, a dev string is used.
368 '-e', 'CAST_BUILD_RELEASE="<!(if test -f <(cast_build_release); then cat <(cast_build_release); else echo eng.${USER}; fi)"',
369 '-e', 'CAST_IS_DEBUG_BUILD=1 if "<(CONFIGURATION_NAME)" == "Debug" or <(cast_is_debug_build) == 1 else 0',
370 '-e', 'CAST_PRODUCT_TYPE=<(cast_product_type)',
371 'common/version.h.in',
375 '../build/util/version.gypi',
382 # Targets for Android receiver.
387 'target_name': 'cast_shell_icudata',
390 '../third_party/icu/icu.gyp:icudata',
391 '../v8/tools/gyp/v8.gyp:v8_external_snapshot',
394 'destination': '<(PRODUCT_DIR)/assets',
396 '<(PRODUCT_DIR)/icudtl.dat',
397 '<(PRODUCT_DIR)/natives_blob.bin',
398 '<(PRODUCT_DIR)/snapshot_blob.bin',
403 'target_name': 'libcast_shell_android',
404 'type': 'shared_library',
408 'cast_shell_icudata',
410 'cast_version_header',
411 '../base/base.gyp:base',
412 '../breakpad/breakpad.gyp:breakpad_client',
413 '../components/components.gyp:breakpad_host',
414 '../components/components.gyp:crash_component',
415 '../content/content.gyp:content',
416 '../skia/skia.gyp:skia',
417 '../ui/gfx/gfx.gyp:gfx',
418 '../ui/gl/gl.gyp:gl',
424 'android/cast_jni_registrar.cc',
425 'android/cast_jni_registrar.h',
426 'android/chromecast_config_android.cc',
427 'android/chromecast_config_android.h',
428 'android/platform_jni_loader.h',
429 'app/android/cast_jni_loader.cc',
430 'browser/android/cast_window_android.cc',
431 'browser/android/cast_window_android.h',
432 'browser/android/cast_window_manager.cc',
433 'browser/android/cast_window_manager.h',
434 'browser/android/external_video_surface_container_impl.cc',
435 'browser/android/external_video_surface_container_impl.h',
436 'crash/android/cast_crash_reporter_client_android.cc',
437 'crash/android/cast_crash_reporter_client_android.h',
438 'crash/android/crash_handler.cc',
439 'crash/android/crash_handler.h',
442 ['chromecast_branding=="Chrome"', {
444 'internal/chromecast_internal.gyp:cast_shell_android_internal'
448 'android/chromecast_config_android_stub.cc',
449 'android/platform_jni_loader_stub.cc',
453 }, # end of target 'libcast_shell_android'
455 'target_name': 'cast_shell_java',
458 '<(android_support_v13_target)',
459 '../base/base.gyp:base_java',
460 '../content/content.gyp:content_java',
461 '../media/media.gyp:media_java',
462 '../net/net.gyp:net_java',
463 '../ui/android/ui_android.gyp:ui_java',
466 'has_java_resources': 1,
467 'java_in_dir': 'browser/android/apk',
468 'resource_dir': 'browser/android/apk/res',
469 'R_package': 'org.chromium.chromecast.shell',
471 'includes': ['../build/java.gypi'],
472 }, # end of target 'cast_shell_java'
474 'target_name': 'cast_shell_manifest',
477 'jinja_inputs': ['browser/android/apk/AndroidManifest.xml.jinja2'],
478 'jinja_output': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
480 'includes': [ '../build/android/jinja_template.gypi' ],
483 'target_name': 'cast_shell_apk',
487 'libcast_shell_android',
490 'apk_name': 'CastShell',
491 'manifest_package_name': 'org.chromium.chromecast.shell',
492 # Note(gunsch): there are no Java files in the android/ directory.
493 # Unfortunately, the java_apk.gypi target rigidly insists on having
494 # a java_in_dir directory, but complains about duplicate classes
495 # from the common cast_shell_java target (shared with internal APK)
496 # if the actual Java path is used.
497 # This will hopefully be removable after the great GN migration.
498 'java_in_dir': 'android',
499 'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
500 'package_name': 'org.chromium.chromecast.shell',
501 'native_lib_target': 'libcast_shell_android',
502 'asset_location': '<(PRODUCT_DIR)/assets',
503 'additional_input_paths': ['<(PRODUCT_DIR)/assets/cast_shell.pak'],
505 'includes': [ '../build/java_apk.gypi' ],
508 'target_name': 'cast_jni_headers',
511 'browser/android/apk/src/org/chromium/chromecast/shell/CastCrashHandler.java',
512 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java',
513 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowManager.java',
514 'browser/android/apk/src/org/chromium/chromecast/shell/ExternalVideoSurfaceContainer.java',
516 'direct_dependent_settings': {
518 '<(SHARED_INTERMEDIATE_DIR)/chromecast',
522 'jni_gen_package': 'chromecast',
524 'includes': [ '../build/jni_generator.gypi' ],
527 }, { # OS != "android"
530 'target_name': 'cast_shell_media',
531 'type': '<(component)',
533 'media/media.gyp:cast_media',
534 '../content/content.gyp:content',
535 '../ipc/ipc.gyp:ipc',
536 '../media/media.gyp:media',
539 'browser/media/cast_browser_cdm_factory.cc',
540 'browser/media/cast_browser_cdm_factory.h',
541 'browser/media/cma_message_filter_host.cc',
542 'browser/media/cma_message_filter_host.h',
543 'browser/media/cma_message_loop.cc',
544 'browser/media/cma_message_loop.h',
545 'browser/media/media_pipeline_host.cc',
546 'browser/media/media_pipeline_host.h',
547 'common/media/cma_ipc_common.h',
548 'common/media/cma_messages.h',
549 'common/media/cma_message_generator.cc',
550 'common/media/cma_message_generator.h',
551 'common/media/cma_param_traits.cc',
552 'common/media/cma_param_traits.h',
553 'common/media/shared_memory_chunk.cc',
554 'common/media/shared_memory_chunk.h',
555 'renderer/media/audio_pipeline_proxy.cc',
556 'renderer/media/audio_pipeline_proxy.h',
557 'renderer/media/chromecast_media_renderer_factory.cc',
558 'renderer/media/chromecast_media_renderer_factory.h',
559 'renderer/media/cma_message_filter_proxy.cc',
560 'renderer/media/cma_message_filter_proxy.h',
561 'renderer/media/media_channel_proxy.cc',
562 'renderer/media/media_channel_proxy.h',
563 'renderer/media/media_pipeline_proxy.cc',
564 'renderer/media/media_pipeline_proxy.h',
565 'renderer/media/video_pipeline_proxy.cc',
566 'renderer/media/video_pipeline_proxy.h',
568 }, # end of target 'cast_shell_media'
569 # This target contains all of the primary code of |cast_shell|, except
570 # for |main|. This allows end-to-end tests using |cast_shell|.
571 # This also includes all targets that cannot be built on Android.
573 'target_name': 'cast_shell_core',
574 'type': '<(component)',
578 'media/media.gyp:cast_media',
581 ['chromecast_branding=="Chrome"', {
583 'internal/chromecast_internal.gyp:cast_gfx_internal',
587 '../ui/ozone/ozone.gyp:eglplatform_shim_x11',
593 'target_name': 'cast_shell',
594 'type': 'executable',
602 # Allow OEMs to override default libraries that are shipped with
603 # cast receiver package by installed OEM-specific libraries in
605 '-Wl,-rpath=/oem_cast_shlib',
606 # TODO(dougsteed): remove when Chromecast moves to boringssl.
607 # Allow the cast shell to find the NSS module in the same
609 '-Wl,-rpath=\$$ORIGIN'
614 ['enable_default_cast_graphics==1', {
617 'target_name': 'libcast_graphics_1.0',
618 'type': 'shared_library',
623 'graphics/cast_egl_platform_default.cc',
624 'graphics/graphics_properties_default.cc'
629 ], # end of conditions