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',
11 'chromecast_branding%': 'Chromium',
12 'disable_display%': 0,
13 'use_chromecast_webui%': 0,
16 'chromecast_tests.gypi',
20 '..', # Root of Chromium checkout
23 ['disable_display==1', {
24 'defines': ['DISABLE_DISPLAY'],
29 # Public API target for OEM partners to replace shlibs.
31 'target_name': 'cast_public_api',
32 'type': '<(component)',
34 'public/chromecast_export.h',
37 # TODO(gunsch): Remove this fake target once it's either added or no
38 # longer referenced from internal code.
39 {'target_name': 'cast_media_audio', 'type': 'none'},
42 'target_name': 'cast_base',
43 'type': '<(component)',
45 '../base/base.gyp:base',
50 'base/metrics/cast_histograms.h',
51 'base/metrics/cast_metrics_helper.cc',
52 'base/metrics/cast_metrics_helper.h',
53 'base/metrics/grouped_histogram.cc',
54 'base/metrics/grouped_histogram.h'
56 }, # end of target 'cast_base'
58 'target_name': 'cast_crash_client',
59 'type': '<(component)',
61 '../breakpad/breakpad.gyp:breakpad_client',
62 '../components/components.gyp:crash_component',
65 'crash/cast_crash_keys.cc',
66 'crash/cast_crash_keys.h',
67 'crash/cast_crash_reporter_client.cc',
68 'crash/cast_crash_reporter_client.h',
71 ['chromecast_branding=="Chrome"', {
73 'internal/chromecast_internal.gyp:crash_internal',
77 'crash/cast_crash_reporter_client_simple.cc',
81 }, # end of target 'cast_crash_client'
83 'target_name': 'cast_net',
84 'type': '<(component)',
86 'net/connectivity_checker.cc',
87 'net/connectivity_checker.h',
88 'net/net_switches.cc',
93 'target_name': 'cast_ozone',
94 'type': '<(component)',
96 'ozone/gpu_platform_support_cast.cc',
97 'ozone/gpu_platform_support_cast.h',
98 'ozone/ozone_platform_cast.cc',
99 'ozone/ozone_platform_cast.h',
100 'ozone/platform_window_cast.cc',
101 'ozone/platform_window_cast.h',
102 'ozone/surface_factory_cast.cc',
103 'ozone/surface_factory_cast.h',
104 'ozone/surface_ozone_egl_cast.cc',
105 'ozone/surface_ozone_egl_cast.h',
109 'target_name': 'cast_shell_resources',
112 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chromecast',
116 'action_name': 'cast_shell_resources',
118 'grit_grd_file': 'app/resources/shell_resources.grd',
119 'grit_resource_ids': 'app/resources/resource_ids',
121 'includes': [ '../build/grit_action.gypi' ],
124 'includes': [ '../build/grit_target.gypi' ],
127 'target_name': 'cast_shell_pak',
130 'cast_shell_resources',
131 '../content/app/resources/content_resources.gyp:content_resources',
132 '../content/app/strings/content_strings.gyp:content_strings',
133 '../net/net.gyp:net_resources',
134 '../third_party/WebKit/public/blink_resources.gyp:blink_resources',
135 '../ui/resources/ui_resources.gyp:ui_resources',
136 '../ui/strings/ui_strings.gyp:ui_strings',
140 'action_name': 'repack_cast_shell_pak',
143 '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_resources_100_percent.pak',
144 '<(SHARED_INTERMEDIATE_DIR)/chromecast/shell_resources.pak',
145 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
146 '<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_100_percent.pak',
147 '<(SHARED_INTERMEDIATE_DIR)/content/app/strings/content_strings_en-US.pak',
148 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
149 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percent.pak',
150 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/webui_resources.pak',
151 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/app_locale_settings_en-US.pak',
152 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/ui_strings_en-US.pak',
155 ['chromecast_branding=="Chrome" and use_chromecast_webui==1', {
157 '<(SHARED_INTERMEDIATE_DIR)/chromecast/app_resources.pak',
158 '<(SHARED_INTERMEDIATE_DIR)/chromecast/cast_webui_resources.pak',
162 'pak_output': '<(PRODUCT_DIR)/assets/cast_shell.pak',
164 'includes': [ '../build/repack_action.gypi' ],
168 ['chromecast_branding=="Chrome" and use_chromecast_webui==1', {
170 'internal/chromecast_resources.gyp:chromecast_app_resources',
171 'internal/chromecast_resources.gyp:chromecast_webui_resources',
175 }, # end of target 'cast_shell_pak'
176 # This target contains all content-embedder implementation that is
177 # non-platform-specific.
179 'target_name': 'cast_shell_common',
180 'type': '<(component)',
186 'cast_shell_resources',
187 'cast_version_header',
188 'chromecast_locales.gyp:chromecast_locales_pak',
189 'chromecast_locales.gyp:chromecast_settings',
190 'media/media.gyp:media_base',
191 '../base/base.gyp:base',
192 '../components/components.gyp:breakpad_host',
193 '../components/components.gyp:cdm_renderer',
194 '../components/components.gyp:component_metrics_proto',
195 '../components/components.gyp:crash_component',
196 '../components/components.gyp:network_hints_browser',
197 '../components/components.gyp:network_hints_renderer',
198 '../components/components.gyp:metrics',
199 '../components/components.gyp:metrics_gpu',
200 '../components/components.gyp:metrics_net',
201 '../components/components.gyp:metrics_profiler',
202 '../content/content.gyp:content',
203 '../content/content.gyp:content_app_both',
204 '../skia/skia.gyp:skia',
205 '../third_party/WebKit/public/blink.gyp:blink',
206 '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
209 'app/cast_main_delegate.cc',
210 'app/cast_main_delegate.h',
211 'browser/cast_browser_context.cc',
212 'browser/cast_browser_context.h',
213 'browser/cast_browser_main_parts.cc',
214 'browser/cast_browser_main_parts.h',
215 'browser/cast_browser_process.cc',
216 'browser/cast_browser_process.h',
217 'browser/cast_content_browser_client.cc',
218 'browser/cast_content_browser_client.h',
219 'browser/cast_content_window.cc',
220 'browser/cast_content_window.h',
221 'browser/cast_download_manager_delegate.cc',
222 'browser/cast_download_manager_delegate.h',
223 'browser/cast_http_user_agent_settings.cc',
224 'browser/cast_http_user_agent_settings.h',
225 'browser/cast_network_delegate.cc',
226 'browser/cast_network_delegate.h',
227 'browser/cast_permission_manager.cc',
228 'browser/cast_permission_manager.h',
229 'browser/cast_resource_dispatcher_host_delegate.cc',
230 'browser/cast_resource_dispatcher_host_delegate.h',
231 'browser/devtools/cast_dev_tools_delegate.cc',
232 'browser/devtools/cast_dev_tools_delegate.h',
233 'browser/devtools/remote_debugging_server.cc',
234 'browser/devtools/remote_debugging_server.h',
235 'browser/geolocation/cast_access_token_store.cc',
236 'browser/geolocation/cast_access_token_store.h',
237 'browser/metrics/cast_metrics_prefs.cc',
238 'browser/metrics/cast_metrics_prefs.h',
239 'browser/metrics/cast_metrics_service_client.cc',
240 'browser/metrics/cast_metrics_service_client.h',
241 'browser/metrics/cast_stability_metrics_provider.cc',
242 'browser/metrics/cast_stability_metrics_provider.h',
243 'browser/metrics/platform_metrics_providers.h',
244 'browser/pref_service_helper.cc',
245 'browser/pref_service_helper.h',
246 'browser/service/cast_service.cc',
247 'browser/service/cast_service.h',
248 'browser/url_request_context_factory.cc',
249 'browser/url_request_context_factory.h',
250 'common/cast_content_client.cc',
251 'common/cast_content_client.h',
252 'common/cast_resource_delegate.cc',
253 'common/cast_resource_delegate.h',
254 'common/chromecast_switches.cc',
255 'common/chromecast_switches.h',
256 'common/media/cast_messages.h',
257 'common/media/cast_message_generator.cc',
258 'common/media/cast_message_generator.h',
259 'common/platform_client_auth.h',
260 'common/pref_names.cc',
261 'common/pref_names.h',
262 'renderer/cast_content_renderer_client.cc',
263 'renderer/cast_content_renderer_client.h',
264 'renderer/cast_media_load_deferrer.cc',
265 'renderer/cast_media_load_deferrer.h',
266 'renderer/cast_render_process_observer.cc',
267 'renderer/cast_render_process_observer.h',
268 'renderer/key_systems_cast.cc',
269 'renderer/key_systems_cast.h',
270 'renderer/media/capabilities_message_filter.cc',
271 'renderer/media/capabilities_message_filter.h',
274 ['chromecast_branding=="Chrome"', {
276 'internal/chromecast_internal.gyp:cast_shell_internal',
280 'browser/cast_content_browser_client_simple.cc',
281 'browser/cast_network_delegate_simple.cc',
282 'browser/devtools/remote_debugging_server_simple.cc',
283 'browser/media/cast_browser_cdm_factory_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/service/cast_service_simple.cc',
299 'browser/service/cast_service_simple.h',
304 # ExternalMetrics not necessary on Android and (as of this writing) uses
305 # non-portable filesystem operations. Also webcrypto is not used on
309 'browser/metrics/external_metrics.cc',
310 'browser/metrics/external_metrics.h',
313 '../components/components.gyp:metrics_serialization',
319 'target_name': 'cast_version_header',
321 'direct_dependent_settings': {
323 '<(SHARED_INTERMEDIATE_DIR)',
328 'action_name': 'version_header',
329 'message': 'Generating version header file: <@(_outputs)',
332 'common/version.h.in',
335 '<(SHARED_INTERMEDIATE_DIR)/chromecast/common/version.h',
339 '<(version_py_path)',
340 '-e', 'VERSION_FULL="<(version_full)"',
341 # CAST_BUILD_INCREMENTAL is taken from buildbot if available;
342 # otherwise, a dev string is used.
343 '-e', 'CAST_BUILD_INCREMENTAL="<!(echo ${CAST_BUILD_INCREMENTAL:="<!(date +%Y%m%d.%H%M%S)"})"',
344 # CAST_BUILD_RELEASE is taken from cast_build_release file if exist;
345 # otherwise, a dev string is used.
346 '-e', 'CAST_BUILD_RELEASE="<!(if test -f <(cast_build_release); then cat <(cast_build_release); else echo eng.${USER}; fi)"',
347 '-e', 'CAST_IS_DEBUG_BUILD=1 if "<(CONFIGURATION_NAME)" == "Debug" else 0',
348 'common/version.h.in',
352 '../build/util/version.gypi',
359 # Targets for Android receiver.
364 'target_name': 'cast_shell_icudata',
367 '../third_party/icu/icu.gyp:icudata',
370 'destination': '<(PRODUCT_DIR)/assets',
371 'files': ['<(PRODUCT_DIR)/icudtl.dat'],
375 'target_name': 'libcast_shell_android',
376 'type': 'shared_library',
380 'cast_shell_icudata',
382 'cast_version_header',
383 '../base/base.gyp:base',
384 '../breakpad/breakpad.gyp:breakpad_client',
385 '../components/components.gyp:breakpad_host',
386 '../components/components.gyp:crash_component',
387 '../content/content.gyp:content',
388 '../skia/skia.gyp:skia',
389 '../ui/gfx/gfx.gyp:gfx',
390 '../ui/gl/gl.gyp:gl',
396 'android/cast_jni_registrar.cc',
397 'android/cast_jni_registrar.h',
398 'android/chromecast_config_android.cc',
399 'android/chromecast_config_android.h',
400 'android/platform_jni_loader.h',
401 'app/android/cast_jni_loader.cc',
402 'browser/android/cast_window_android.cc',
403 'browser/android/cast_window_android.h',
404 'browser/android/cast_window_manager.cc',
405 'browser/android/cast_window_manager.h',
406 'browser/android/external_video_surface_container_impl.cc',
407 'browser/android/external_video_surface_container_impl.h',
408 'crash/android/cast_crash_reporter_client_android.cc',
409 'crash/android/cast_crash_reporter_client_android.h',
410 'crash/android/crash_handler.cc',
411 'crash/android/crash_handler.h',
414 ['chromecast_branding=="Chrome"', {
416 'internal/chromecast_internal.gyp:cast_shell_android_internal'
420 'android/chromecast_config_android_stub.cc',
421 'android/platform_jni_loader_stub.cc',
425 }, # end of target 'libcast_shell_android'
427 'target_name': 'cast_shell_java',
430 '<(android_support_v13_target)',
431 '../base/base.gyp:base_java',
432 '../content/content.gyp:content_java',
433 '../media/media.gyp:media_java',
434 '../net/net.gyp:net_java',
435 '../ui/android/ui_android.gyp:ui_java',
438 'has_java_resources': 1,
439 'java_in_dir': 'browser/android/apk',
440 'resource_dir': 'browser/android/apk/res',
441 'R_package': 'org.chromium.chromecast.shell',
443 'includes': ['../build/java.gypi'],
444 }, # end of target 'cast_shell_java'
446 'target_name': 'cast_shell_manifest',
449 'jinja_inputs': ['browser/android/apk/AndroidManifest.xml.jinja2'],
450 'jinja_output': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
452 'includes': [ '../build/android/jinja_template.gypi' ],
455 'target_name': 'cast_shell_apk',
459 'libcast_shell_android',
462 'apk_name': 'CastShell',
463 'manifest_package_name': 'org.chromium.chromecast.shell',
464 # Note(gunsch): there are no Java files in the android/ directory.
465 # Unfortunately, the java_apk.gypi target rigidly insists on having
466 # a java_in_dir directory, but complains about duplicate classes
467 # from the common cast_shell_java target (shared with internal APK)
468 # if the actual Java path is used.
469 # This will hopefully be removable after the great GN migration.
470 'java_in_dir': 'android',
471 'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
472 'package_name': 'org.chromium.chromecast.shell',
473 'native_lib_target': 'libcast_shell_android',
474 'asset_location': '<(PRODUCT_DIR)/assets',
475 'additional_input_paths': ['<(PRODUCT_DIR)/assets/cast_shell.pak'],
477 'includes': [ '../build/java_apk.gypi' ],
480 'target_name': 'cast_jni_headers',
483 'browser/android/apk/src/org/chromium/chromecast/shell/CastCrashHandler.java',
484 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java',
485 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowManager.java',
486 'browser/android/apk/src/org/chromium/chromecast/shell/ExternalVideoSurfaceContainer.java',
488 'direct_dependent_settings': {
490 '<(SHARED_INTERMEDIATE_DIR)/chromecast',
494 'jni_gen_package': 'chromecast',
496 'includes': [ '../build/jni_generator.gypi' ],
499 }, { # OS != "android"
502 'target_name': 'cast_shell_media',
503 'type': '<(component)',
505 'media/media.gyp:cast_media',
506 '../content/content.gyp:content',
507 '../ipc/ipc.gyp:ipc',
508 '../media/media.gyp:media',
511 'browser/media/cast_browser_cdm_factory.cc',
512 'browser/media/cast_browser_cdm_factory.h',
513 'browser/media/cma_message_filter_host.cc',
514 'browser/media/cma_message_filter_host.h',
515 'browser/media/cma_message_loop.cc',
516 'browser/media/cma_message_loop.h',
517 'browser/media/media_pipeline_host.cc',
518 'browser/media/media_pipeline_host.h',
519 'common/media/cma_ipc_common.h',
520 'common/media/cma_messages.h',
521 'common/media/cma_message_generator.cc',
522 'common/media/cma_message_generator.h',
523 'common/media/cma_param_traits.cc',
524 'common/media/cma_param_traits.h',
525 'common/media/shared_memory_chunk.cc',
526 'common/media/shared_memory_chunk.h',
527 'renderer/media/audio_pipeline_proxy.cc',
528 'renderer/media/audio_pipeline_proxy.h',
529 'renderer/media/chromecast_media_renderer_factory.cc',
530 'renderer/media/chromecast_media_renderer_factory.h',
531 'renderer/media/cma_message_filter_proxy.cc',
532 'renderer/media/cma_message_filter_proxy.h',
533 'renderer/media/media_channel_proxy.cc',
534 'renderer/media/media_channel_proxy.h',
535 'renderer/media/media_pipeline_proxy.cc',
536 'renderer/media/media_pipeline_proxy.h',
537 'renderer/media/video_pipeline_proxy.cc',
538 'renderer/media/video_pipeline_proxy.h',
540 }, # end of target 'cast_shell_media'
541 # This target contains all of the primary code of |cast_shell|, except
542 # for |main|. This allows end-to-end tests using |cast_shell|.
543 # This also includes all targets that cannot be built on Android.
545 'target_name': 'cast_shell_core',
546 'type': '<(component)',
551 'media/media.gyp:cast_media',
552 '../ui/aura/aura.gyp:aura_test_support',
555 ['chromecast_branding=="Chrome"', {
557 'internal/chromecast_internal.gyp:cast_gfx_internal',
561 '../ui/ozone/ozone.gyp:eglplatform_shim_x11',
567 'target_name': 'cast_shell',
568 'type': 'executable',
575 # TODO(dougsteed): remove when Chromecast moves to boringssl.
576 # Allow the cast shell to find the NSS module in the same directory.
578 '-Wl,-rpath=\$$ORIGIN'
583 ], # end of conditions