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 'enable_default_cast_graphics%': 1,
14 'ozone_platform_cast%': 0,
15 'use_chromecast_webui%': 0,
18 'chromecast_tests.gypi',
22 '..', # Root of Chromium checkout
25 ['disable_display==1', {
26 'defines': ['DISABLE_DISPLAY'],
31 # Public API target for OEM partners to replace shlibs.
33 'target_name': 'cast_public_api',
34 'type': '<(component)',
36 'public/cast_egl_platform.h',
37 'public/cast_egl_platform_shlib.h',
38 'public/chromecast_export.h',
41 # TODO(gunsch): Remove this fake target once it's either added or no
42 # longer referenced from internal code.
43 {'target_name': 'cast_media_audio', 'type': 'none'},
46 'target_name': 'cast_base',
47 'type': '<(component)',
49 '../base/base.gyp:base',
54 'base/metrics/cast_histograms.h',
55 'base/metrics/cast_metrics_helper.cc',
56 'base/metrics/cast_metrics_helper.h',
57 'base/metrics/grouped_histogram.cc',
58 'base/metrics/grouped_histogram.h'
60 }, # end of target 'cast_base'
62 'target_name': 'cast_crash_client',
63 'type': '<(component)',
65 '../breakpad/breakpad.gyp:breakpad_client',
66 '../components/components.gyp:crash_component',
69 'crash/cast_crash_keys.cc',
70 'crash/cast_crash_keys.h',
71 'crash/cast_crash_reporter_client.cc',
72 'crash/cast_crash_reporter_client.h',
75 ['chromecast_branding=="Chrome"', {
77 'internal/chromecast_internal.gyp:crash_internal',
81 'crash/cast_crash_reporter_client_simple.cc',
85 }, # end of target 'cast_crash_client'
87 'target_name': 'cast_net',
88 'type': '<(component)',
90 'net/connectivity_checker.cc',
91 'net/connectivity_checker.h',
92 'net/net_switches.cc',
97 'target_name': 'cast_shell_resources',
100 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chromecast',
104 'action_name': 'cast_shell_resources',
106 'grit_grd_file': 'app/resources/shell_resources.grd',
107 'grit_resource_ids': 'app/resources/resource_ids',
109 'includes': [ '../build/grit_action.gypi' ],
112 'includes': [ '../build/grit_target.gypi' ],
115 'target_name': 'cast_shell_pak',
118 'cast_shell_resources',
119 '../content/app/resources/content_resources.gyp:content_resources',
120 '../content/app/strings/content_strings.gyp:content_strings',
121 '../net/net.gyp:net_resources',
122 '../third_party/WebKit/public/blink_resources.gyp:blink_resources',
123 '../ui/resources/ui_resources.gyp:ui_resources',
124 '../ui/strings/ui_strings.gyp:ui_strings',
128 'action_name': 'repack_cast_shell_pak',
131 '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_resources.pak',
132 '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_image_resources_100_percent.pak',
133 '<(SHARED_INTERMEDIATE_DIR)/chromecast/shell_resources.pak',
134 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
135 '<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_100_percent.pak',
136 '<(SHARED_INTERMEDIATE_DIR)/content/app/strings/content_strings_en-US.pak',
137 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
138 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percent.pak',
139 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/webui_resources.pak',
140 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/app_locale_settings_en-US.pak',
141 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/ui_strings_en-US.pak',
144 ['chromecast_branding=="Chrome" and use_chromecast_webui==1', {
146 '<(SHARED_INTERMEDIATE_DIR)/chromecast/app_resources.pak',
147 '<(SHARED_INTERMEDIATE_DIR)/chromecast/cast_webui_resources.pak',
151 'pak_output': '<(PRODUCT_DIR)/assets/cast_shell.pak',
153 'includes': [ '../build/repack_action.gypi' ],
157 ['chromecast_branding=="Chrome" and use_chromecast_webui==1', {
159 'internal/chromecast_resources.gyp:chromecast_app_resources',
160 'internal/chromecast_resources.gyp:chromecast_webui_resources',
164 }, # end of target 'cast_shell_pak'
165 # This target contains all content-embedder implementation that is
166 # non-platform-specific.
168 'target_name': 'cast_shell_common',
169 'type': '<(component)',
175 'cast_shell_resources',
176 'cast_version_header',
177 'chromecast_locales.gyp:chromecast_locales_pak',
178 'chromecast_locales.gyp:chromecast_settings',
179 'media/media.gyp:media_base',
180 '../base/base.gyp:base',
181 '../components/components.gyp:breakpad_host',
182 '../components/components.gyp:cdm_renderer',
183 '../components/components.gyp:component_metrics_proto',
184 '../components/components.gyp:crash_component',
185 '../components/components.gyp:network_hints_browser',
186 '../components/components.gyp:network_hints_renderer',
187 '../components/components.gyp:metrics',
188 '../components/components.gyp:metrics_gpu',
189 '../components/components.gyp:metrics_net',
190 '../components/components.gyp:metrics_profiler',
191 '../content/content.gyp:content',
192 '../content/content.gyp:content_app_both',
193 '../skia/skia.gyp:skia',
194 '../third_party/WebKit/public/blink.gyp:blink',
195 '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
198 'app/cast_main_delegate.cc',
199 'app/cast_main_delegate.h',
200 'browser/cast_browser_context.cc',
201 'browser/cast_browser_context.h',
202 'browser/cast_browser_main_parts.cc',
203 'browser/cast_browser_main_parts.h',
204 'browser/cast_browser_process.cc',
205 'browser/cast_browser_process.h',
206 'browser/cast_content_browser_client.cc',
207 'browser/cast_content_browser_client.h',
208 'browser/cast_content_window.cc',
209 'browser/cast_content_window.h',
210 'browser/cast_download_manager_delegate.cc',
211 'browser/cast_download_manager_delegate.h',
212 'browser/cast_http_user_agent_settings.cc',
213 'browser/cast_http_user_agent_settings.h',
214 'browser/cast_network_delegate.cc',
215 'browser/cast_network_delegate.h',
216 'browser/cast_permission_manager.cc',
217 'browser/cast_permission_manager.h',
218 'browser/cast_resource_dispatcher_host_delegate.cc',
219 'browser/cast_resource_dispatcher_host_delegate.h',
220 'browser/devtools/cast_dev_tools_delegate.cc',
221 'browser/devtools/cast_dev_tools_delegate.h',
222 'browser/devtools/remote_debugging_server.cc',
223 'browser/devtools/remote_debugging_server.h',
224 'browser/geolocation/cast_access_token_store.cc',
225 'browser/geolocation/cast_access_token_store.h',
226 'browser/metrics/cast_metrics_prefs.cc',
227 'browser/metrics/cast_metrics_prefs.h',
228 'browser/metrics/cast_metrics_service_client.cc',
229 'browser/metrics/cast_metrics_service_client.h',
230 'browser/metrics/cast_stability_metrics_provider.cc',
231 'browser/metrics/cast_stability_metrics_provider.h',
232 'browser/metrics/platform_metrics_providers.h',
233 'browser/pref_service_helper.cc',
234 'browser/pref_service_helper.h',
235 'browser/service/cast_service.cc',
236 'browser/service/cast_service.h',
237 'browser/url_request_context_factory.cc',
238 'browser/url_request_context_factory.h',
239 'common/cast_content_client.cc',
240 'common/cast_content_client.h',
241 'common/cast_resource_delegate.cc',
242 'common/cast_resource_delegate.h',
243 'common/chromecast_switches.cc',
244 'common/chromecast_switches.h',
245 'common/media/cast_messages.h',
246 'common/media/cast_message_generator.cc',
247 'common/media/cast_message_generator.h',
248 'common/platform_client_auth.h',
249 'common/pref_names.cc',
250 'common/pref_names.h',
251 'renderer/cast_content_renderer_client.cc',
252 'renderer/cast_content_renderer_client.h',
253 'renderer/cast_media_load_deferrer.cc',
254 'renderer/cast_media_load_deferrer.h',
255 'renderer/cast_render_process_observer.cc',
256 'renderer/cast_render_process_observer.h',
257 'renderer/key_systems_cast.cc',
258 'renderer/key_systems_cast.h',
259 'renderer/media/capabilities_message_filter.cc',
260 'renderer/media/capabilities_message_filter.h',
263 ['chromecast_branding=="Chrome"', {
265 'internal/chromecast_internal.gyp:cast_shell_internal',
269 'browser/cast_content_browser_client_simple.cc',
270 'browser/cast_network_delegate_simple.cc',
271 'browser/devtools/remote_debugging_server_simple.cc',
272 'browser/metrics/platform_metrics_providers_simple.cc',
273 'browser/pref_service_helper_simple.cc',
274 'common/platform_client_auth_simple.cc',
275 'renderer/cast_content_renderer_client_simple.cc',
276 'renderer/key_systems_cast_simple.cc',
281 'browser/service/cast_service_android.cc',
282 'browser/service/cast_service_android.h',
286 'browser/media/cast_browser_cdm_factory_simple.cc',
287 'browser/service/cast_service_simple.cc',
288 'browser/service/cast_service_simple.h',
293 # ExternalMetrics not necessary on Android and (as of this writing) uses
294 # non-portable filesystem operations. Also webcrypto is not used on
298 'browser/metrics/external_metrics.cc',
299 'browser/metrics/external_metrics.h',
302 '../components/components.gyp:metrics_serialization',
308 'target_name': 'cast_version_header',
310 'direct_dependent_settings': {
312 '<(SHARED_INTERMEDIATE_DIR)',
317 'action_name': 'version_header',
318 'message': 'Generating version header file: <@(_outputs)',
321 'common/version.h.in',
324 '<(SHARED_INTERMEDIATE_DIR)/chromecast/common/version.h',
328 '<(version_py_path)',
329 '-e', 'VERSION_FULL="<(version_full)"',
330 # CAST_BUILD_INCREMENTAL is taken from buildbot if available;
331 # otherwise, a dev string is used.
332 '-e', 'CAST_BUILD_INCREMENTAL="<!(echo ${CAST_BUILD_INCREMENTAL:="<!(date +%Y%m%d.%H%M%S)"})"',
333 # CAST_BUILD_RELEASE is taken from cast_build_release file if exist;
334 # otherwise, a dev string is used.
335 '-e', 'CAST_BUILD_RELEASE="<!(if test -f <(cast_build_release); then cat <(cast_build_release); else echo eng.${USER}; fi)"',
336 '-e', 'CAST_IS_DEBUG_BUILD=1 if "<(CONFIGURATION_NAME)" == "Debug" else 0',
337 'common/version.h.in',
341 '../build/util/version.gypi',
348 # Targets for Android receiver.
353 'target_name': 'cast_shell_icudata',
356 '../third_party/icu/icu.gyp:icudata',
357 '../v8/tools/gyp/v8.gyp:v8_external_snapshot',
360 'destination': '<(PRODUCT_DIR)/assets',
362 '<(PRODUCT_DIR)/icudtl.dat',
363 '<(PRODUCT_DIR)/natives_blob.bin',
364 '<(PRODUCT_DIR)/snapshot_blob.bin',
369 'target_name': 'libcast_shell_android',
370 'type': 'shared_library',
374 'cast_shell_icudata',
376 'cast_version_header',
377 '../base/base.gyp:base',
378 '../breakpad/breakpad.gyp:breakpad_client',
379 '../components/components.gyp:breakpad_host',
380 '../components/components.gyp:crash_component',
381 '../content/content.gyp:content',
382 '../skia/skia.gyp:skia',
383 '../ui/gfx/gfx.gyp:gfx',
384 '../ui/gl/gl.gyp:gl',
390 'android/cast_jni_registrar.cc',
391 'android/cast_jni_registrar.h',
392 'android/chromecast_config_android.cc',
393 'android/chromecast_config_android.h',
394 'android/platform_jni_loader.h',
395 'app/android/cast_jni_loader.cc',
396 'browser/android/cast_window_android.cc',
397 'browser/android/cast_window_android.h',
398 'browser/android/cast_window_manager.cc',
399 'browser/android/cast_window_manager.h',
400 'browser/android/external_video_surface_container_impl.cc',
401 'browser/android/external_video_surface_container_impl.h',
402 'crash/android/cast_crash_reporter_client_android.cc',
403 'crash/android/cast_crash_reporter_client_android.h',
404 'crash/android/crash_handler.cc',
405 'crash/android/crash_handler.h',
408 ['chromecast_branding=="Chrome"', {
410 'internal/chromecast_internal.gyp:cast_shell_android_internal'
414 'android/chromecast_config_android_stub.cc',
415 'android/platform_jni_loader_stub.cc',
419 }, # end of target 'libcast_shell_android'
421 'target_name': 'cast_shell_java',
424 '<(android_support_v13_target)',
425 '../base/base.gyp:base_java',
426 '../content/content.gyp:content_java',
427 '../media/media.gyp:media_java',
428 '../net/net.gyp:net_java',
429 '../ui/android/ui_android.gyp:ui_java',
432 'has_java_resources': 1,
433 'java_in_dir': 'browser/android/apk',
434 'resource_dir': 'browser/android/apk/res',
435 'R_package': 'org.chromium.chromecast.shell',
437 'includes': ['../build/java.gypi'],
438 }, # end of target 'cast_shell_java'
440 'target_name': 'cast_shell_manifest',
443 'jinja_inputs': ['browser/android/apk/AndroidManifest.xml.jinja2'],
444 'jinja_output': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
446 'includes': [ '../build/android/jinja_template.gypi' ],
449 'target_name': 'cast_shell_apk',
453 'libcast_shell_android',
456 'apk_name': 'CastShell',
457 'manifest_package_name': 'org.chromium.chromecast.shell',
458 # Note(gunsch): there are no Java files in the android/ directory.
459 # Unfortunately, the java_apk.gypi target rigidly insists on having
460 # a java_in_dir directory, but complains about duplicate classes
461 # from the common cast_shell_java target (shared with internal APK)
462 # if the actual Java path is used.
463 # This will hopefully be removable after the great GN migration.
464 'java_in_dir': 'android',
465 'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
466 'package_name': 'org.chromium.chromecast.shell',
467 'native_lib_target': 'libcast_shell_android',
468 'asset_location': '<(PRODUCT_DIR)/assets',
469 'additional_input_paths': ['<(PRODUCT_DIR)/assets/cast_shell.pak'],
471 'includes': [ '../build/java_apk.gypi' ],
474 'target_name': 'cast_jni_headers',
477 'browser/android/apk/src/org/chromium/chromecast/shell/CastCrashHandler.java',
478 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java',
479 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowManager.java',
480 'browser/android/apk/src/org/chromium/chromecast/shell/ExternalVideoSurfaceContainer.java',
482 'direct_dependent_settings': {
484 '<(SHARED_INTERMEDIATE_DIR)/chromecast',
488 'jni_gen_package': 'chromecast',
490 'includes': [ '../build/jni_generator.gypi' ],
493 }, { # OS != "android"
496 'target_name': 'cast_shell_media',
497 'type': '<(component)',
499 'media/media.gyp:cast_media',
500 '../content/content.gyp:content',
501 '../ipc/ipc.gyp:ipc',
502 '../media/media.gyp:media',
505 'browser/media/cast_browser_cdm_factory.cc',
506 'browser/media/cast_browser_cdm_factory.h',
507 'browser/media/cma_message_filter_host.cc',
508 'browser/media/cma_message_filter_host.h',
509 'browser/media/cma_message_loop.cc',
510 'browser/media/cma_message_loop.h',
511 'browser/media/media_pipeline_host.cc',
512 'browser/media/media_pipeline_host.h',
513 'common/media/cma_ipc_common.h',
514 'common/media/cma_messages.h',
515 'common/media/cma_message_generator.cc',
516 'common/media/cma_message_generator.h',
517 'common/media/cma_param_traits.cc',
518 'common/media/cma_param_traits.h',
519 'common/media/shared_memory_chunk.cc',
520 'common/media/shared_memory_chunk.h',
521 'renderer/media/audio_pipeline_proxy.cc',
522 'renderer/media/audio_pipeline_proxy.h',
523 'renderer/media/chromecast_media_renderer_factory.cc',
524 'renderer/media/chromecast_media_renderer_factory.h',
525 'renderer/media/cma_message_filter_proxy.cc',
526 'renderer/media/cma_message_filter_proxy.h',
527 'renderer/media/media_channel_proxy.cc',
528 'renderer/media/media_channel_proxy.h',
529 'renderer/media/media_pipeline_proxy.cc',
530 'renderer/media/media_pipeline_proxy.h',
531 'renderer/media/video_pipeline_proxy.cc',
532 'renderer/media/video_pipeline_proxy.h',
534 }, # end of target 'cast_shell_media'
535 # This target contains all of the primary code of |cast_shell|, except
536 # for |main|. This allows end-to-end tests using |cast_shell|.
537 # This also includes all targets that cannot be built on Android.
539 'target_name': 'cast_shell_core',
540 'type': '<(component)',
544 'media/media.gyp:cast_media',
545 '../ui/aura/aura.gyp:aura_test_support',
548 ['chromecast_branding=="Chrome"', {
550 'internal/chromecast_internal.gyp:cast_gfx_internal',
554 '../ui/ozone/ozone.gyp:eglplatform_shim_x11',
560 'target_name': 'cast_shell',
561 'type': 'executable',
568 # TODO(dougsteed): remove when Chromecast moves to boringssl.
569 # Allow the cast shell to find the NSS module in the same directory.
571 '-Wl,-rpath=\$$ORIGIN'
576 ['enable_default_cast_graphics==1', {
579 'target_name': 'libcast_graphics_1.0',
580 'type': 'shared_library',
585 'graphics/cast_egl_platform_default.cc'
590 ], # end of conditions