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/chromecast_export.h',
42 'public/graphics_properties_shlib.h'
45 # TODO(gunsch): Remove this fake target once it's either added or no
46 # longer referenced from internal code.
47 {'target_name': 'cast_media_audio', 'type': 'none'},
50 'target_name': 'cast_base',
51 'type': '<(component)',
53 '../base/base.gyp:base',
58 'base/metrics/cast_histograms.h',
59 'base/metrics/cast_metrics_helper.cc',
60 'base/metrics/cast_metrics_helper.h',
61 'base/metrics/grouped_histogram.cc',
62 'base/metrics/grouped_histogram.h'
64 }, # end of target 'cast_base'
66 'target_name': 'cast_crash_client',
67 'type': '<(component)',
69 '../breakpad/breakpad.gyp:breakpad_client',
70 '../components/components.gyp:crash_component',
73 'crash/cast_crash_keys.cc',
74 'crash/cast_crash_keys.h',
75 'crash/cast_crash_reporter_client.cc',
76 'crash/cast_crash_reporter_client.h',
79 ['chromecast_branding=="Chrome"', {
81 'internal/chromecast_internal.gyp:crash_internal',
85 'crash/cast_crash_reporter_client_simple.cc',
89 }, # end of target 'cast_crash_client'
91 'target_name': 'cast_net',
92 'type': '<(component)',
94 'net/connectivity_checker.cc',
95 'net/connectivity_checker.h',
96 'net/net_switches.cc',
101 'target_name': 'cast_shell_resources',
104 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chromecast',
108 'action_name': 'cast_shell_resources',
110 'grit_grd_file': 'app/resources/shell_resources.grd',
111 'grit_resource_ids': 'app/resources/resource_ids',
113 'includes': [ '../build/grit_action.gypi' ],
116 'includes': [ '../build/grit_target.gypi' ],
119 'target_name': 'cast_shell_pak',
122 'cast_shell_resources',
123 '../content/app/resources/content_resources.gyp:content_resources',
124 '../content/app/strings/content_strings.gyp:content_strings',
125 '../net/net.gyp:net_resources',
126 '../third_party/WebKit/public/blink_resources.gyp:blink_resources',
127 '../ui/resources/ui_resources.gyp:ui_resources',
128 '../ui/strings/ui_strings.gyp:ui_strings',
132 'action_name': 'repack_cast_shell_pak',
135 '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_resources.pak',
136 '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_image_resources_100_percent.pak',
137 '<(SHARED_INTERMEDIATE_DIR)/chromecast/shell_resources.pak',
138 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
139 '<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_100_percent.pak',
140 '<(SHARED_INTERMEDIATE_DIR)/content/app/strings/content_strings_en-US.pak',
141 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
142 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percent.pak',
143 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/webui_resources.pak',
144 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/app_locale_settings_en-US.pak',
145 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/ui_strings_en-US.pak',
148 ['chromecast_branding=="Chrome" and use_chromecast_webui==1', {
150 '<(SHARED_INTERMEDIATE_DIR)/chromecast/app_resources.pak',
151 '<(SHARED_INTERMEDIATE_DIR)/chromecast/cast_webui_resources.pak',
155 'pak_output': '<(PRODUCT_DIR)/assets/cast_shell.pak',
157 'includes': [ '../build/repack_action.gypi' ],
161 ['chromecast_branding=="Chrome" and use_chromecast_webui==1', {
163 'internal/chromecast_resources.gyp:chromecast_app_resources',
164 'internal/chromecast_resources.gyp:chromecast_webui_resources',
168 }, # end of target 'cast_shell_pak'
169 # This target contains all content-embedder implementation that is
170 # non-platform-specific.
172 'target_name': 'cast_shell_common',
173 'type': '<(component)',
179 'cast_shell_resources',
180 'cast_version_header',
181 'chromecast_locales.gyp:chromecast_locales_pak',
182 'chromecast_locales.gyp:chromecast_settings',
183 'media/media.gyp:media_base',
184 '../base/base.gyp:base',
185 '../components/components.gyp:breakpad_host',
186 '../components/components.gyp:cdm_renderer',
187 '../components/components.gyp:component_metrics_proto',
188 '../components/components.gyp:crash_component',
189 '../components/components.gyp:network_hints_browser',
190 '../components/components.gyp:network_hints_renderer',
191 '../components/components.gyp:metrics',
192 '../components/components.gyp:metrics_gpu',
193 '../components/components.gyp:metrics_net',
194 '../components/components.gyp:metrics_profiler',
195 '../content/content.gyp:content',
196 '../content/content.gyp:content_app_both',
197 '../skia/skia.gyp:skia',
198 '../third_party/WebKit/public/blink.gyp:blink',
199 '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
202 'app/cast_main_delegate.cc',
203 'app/cast_main_delegate.h',
204 'browser/cast_browser_context.cc',
205 'browser/cast_browser_context.h',
206 'browser/cast_browser_main_parts.cc',
207 'browser/cast_browser_main_parts.h',
208 'browser/cast_browser_process.cc',
209 'browser/cast_browser_process.h',
210 'browser/cast_content_browser_client.cc',
211 'browser/cast_content_browser_client.h',
212 'browser/cast_content_window.cc',
213 'browser/cast_content_window.h',
214 'browser/cast_download_manager_delegate.cc',
215 'browser/cast_download_manager_delegate.h',
216 'browser/cast_http_user_agent_settings.cc',
217 'browser/cast_http_user_agent_settings.h',
218 'browser/cast_network_delegate.cc',
219 'browser/cast_network_delegate.h',
220 'browser/cast_permission_manager.cc',
221 'browser/cast_permission_manager.h',
222 'browser/cast_quota_permission_context.cc',
223 'browser/cast_quota_permission_context.h',
224 'browser/cast_resource_dispatcher_host_delegate.cc',
225 'browser/cast_resource_dispatcher_host_delegate.h',
226 'browser/devtools/cast_dev_tools_delegate.cc',
227 'browser/devtools/cast_dev_tools_delegate.h',
228 'browser/devtools/remote_debugging_server.cc',
229 'browser/devtools/remote_debugging_server.h',
230 'browser/geolocation/cast_access_token_store.cc',
231 'browser/geolocation/cast_access_token_store.h',
232 'browser/metrics/cast_metrics_prefs.cc',
233 'browser/metrics/cast_metrics_prefs.h',
234 'browser/metrics/cast_metrics_service_client.cc',
235 'browser/metrics/cast_metrics_service_client.h',
236 'browser/metrics/cast_stability_metrics_provider.cc',
237 'browser/metrics/cast_stability_metrics_provider.h',
238 'browser/metrics/platform_metrics_providers.h',
239 'browser/pref_service_helper.cc',
240 'browser/pref_service_helper.h',
241 'browser/service/cast_service.cc',
242 'browser/service/cast_service.h',
243 'browser/url_request_context_factory.cc',
244 'browser/url_request_context_factory.h',
245 'common/cast_content_client.cc',
246 'common/cast_content_client.h',
247 'common/cast_resource_delegate.cc',
248 'common/cast_resource_delegate.h',
249 'common/chromecast_switches.cc',
250 'common/chromecast_switches.h',
251 'common/media/cast_messages.h',
252 'common/media/cast_message_generator.cc',
253 'common/media/cast_message_generator.h',
254 'common/platform_client_auth.h',
255 'common/pref_names.cc',
256 'common/pref_names.h',
257 'renderer/cast_content_renderer_client.cc',
258 'renderer/cast_content_renderer_client.h',
259 'renderer/cast_media_load_deferrer.cc',
260 'renderer/cast_media_load_deferrer.h',
261 'renderer/cast_render_process_observer.cc',
262 'renderer/cast_render_process_observer.h',
263 'renderer/key_systems_cast.cc',
264 'renderer/key_systems_cast.h',
265 'renderer/media/capabilities_message_filter.cc',
266 'renderer/media/capabilities_message_filter.h',
269 ['chromecast_branding=="Chrome"', {
271 'internal/chromecast_internal.gyp:cast_shell_internal',
275 'browser/cast_content_browser_client_simple.cc',
276 'browser/cast_network_delegate_simple.cc',
277 'browser/devtools/remote_debugging_server_simple.cc',
278 'browser/metrics/platform_metrics_providers_simple.cc',
279 'browser/pref_service_helper_simple.cc',
280 'common/platform_client_auth_simple.cc',
281 'renderer/cast_content_renderer_client_simple.cc',
282 'renderer/key_systems_cast_simple.cc',
287 'browser/service/cast_service_android.cc',
288 'browser/service/cast_service_android.h',
292 'browser/media/cast_browser_cdm_factory_simple.cc',
293 'browser/service/cast_service_simple.cc',
294 'browser/service/cast_service_simple.h',
299 # ExternalMetrics not necessary on Android and (as of this writing) uses
300 # non-portable filesystem operations. Also webcrypto is not used on
304 'browser/metrics/external_metrics.cc',
305 'browser/metrics/external_metrics.h',
308 '../components/components.gyp:metrics_serialization',
314 'target_name': 'cast_version_header',
316 'direct_dependent_settings': {
318 '<(SHARED_INTERMEDIATE_DIR)',
323 'action_name': 'version_header',
324 'message': 'Generating version header file: <@(_outputs)',
327 'common/version.h.in',
330 '<(SHARED_INTERMEDIATE_DIR)/chromecast/common/version.h',
334 '<(version_py_path)',
335 '-e', 'VERSION_FULL="<(version_full)"',
336 # CAST_BUILD_INCREMENTAL is taken from buildbot if available;
337 # otherwise, a dev string is used.
338 '-e', 'CAST_BUILD_INCREMENTAL="<!(echo ${CAST_BUILD_INCREMENTAL:="<!(date +%Y%m%d.%H%M%S)"})"',
339 # CAST_BUILD_RELEASE is taken from cast_build_release file if exist;
340 # otherwise, a dev string is used.
341 '-e', 'CAST_BUILD_RELEASE="<!(if test -f <(cast_build_release); then cat <(cast_build_release); else echo eng.${USER}; fi)"',
342 '-e', 'CAST_IS_DEBUG_BUILD=1 if "<(CONFIGURATION_NAME)" == "Debug" or <(cast_is_debug_build) == 1 else 0',
343 '-e', 'CAST_PRODUCT_TYPE=<(cast_product_type)',
344 'common/version.h.in',
348 '../build/util/version.gypi',
355 # Targets for Android receiver.
360 'target_name': 'cast_shell_icudata',
363 '../third_party/icu/icu.gyp:icudata',
364 '../v8/tools/gyp/v8.gyp:v8_external_snapshot',
367 'destination': '<(PRODUCT_DIR)/assets',
369 '<(PRODUCT_DIR)/icudtl.dat',
370 '<(PRODUCT_DIR)/natives_blob.bin',
371 '<(PRODUCT_DIR)/snapshot_blob.bin',
376 'target_name': 'libcast_shell_android',
377 'type': 'shared_library',
381 'cast_shell_icudata',
383 'cast_version_header',
384 '../base/base.gyp:base',
385 '../breakpad/breakpad.gyp:breakpad_client',
386 '../components/components.gyp:breakpad_host',
387 '../components/components.gyp:crash_component',
388 '../content/content.gyp:content',
389 '../skia/skia.gyp:skia',
390 '../ui/gfx/gfx.gyp:gfx',
391 '../ui/gl/gl.gyp:gl',
397 'android/cast_jni_registrar.cc',
398 'android/cast_jni_registrar.h',
399 'android/chromecast_config_android.cc',
400 'android/chromecast_config_android.h',
401 'android/platform_jni_loader.h',
402 'app/android/cast_jni_loader.cc',
403 'browser/android/cast_window_android.cc',
404 'browser/android/cast_window_android.h',
405 'browser/android/cast_window_manager.cc',
406 'browser/android/cast_window_manager.h',
407 'browser/android/external_video_surface_container_impl.cc',
408 'browser/android/external_video_surface_container_impl.h',
409 'crash/android/cast_crash_reporter_client_android.cc',
410 'crash/android/cast_crash_reporter_client_android.h',
411 'crash/android/crash_handler.cc',
412 'crash/android/crash_handler.h',
415 ['chromecast_branding=="Chrome"', {
417 'internal/chromecast_internal.gyp:cast_shell_android_internal'
421 'android/chromecast_config_android_stub.cc',
422 'android/platform_jni_loader_stub.cc',
426 }, # end of target 'libcast_shell_android'
428 'target_name': 'cast_shell_java',
431 '<(android_support_v13_target)',
432 '../base/base.gyp:base_java',
433 '../content/content.gyp:content_java',
434 '../media/media.gyp:media_java',
435 '../net/net.gyp:net_java',
436 '../ui/android/ui_android.gyp:ui_java',
439 'has_java_resources': 1,
440 'java_in_dir': 'browser/android/apk',
441 'resource_dir': 'browser/android/apk/res',
442 'R_package': 'org.chromium.chromecast.shell',
444 'includes': ['../build/java.gypi'],
445 }, # end of target 'cast_shell_java'
447 'target_name': 'cast_shell_manifest',
450 'jinja_inputs': ['browser/android/apk/AndroidManifest.xml.jinja2'],
451 'jinja_output': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
453 'includes': [ '../build/android/jinja_template.gypi' ],
456 'target_name': 'cast_shell_apk',
460 'libcast_shell_android',
463 'apk_name': 'CastShell',
464 'manifest_package_name': 'org.chromium.chromecast.shell',
465 # Note(gunsch): there are no Java files in the android/ directory.
466 # Unfortunately, the java_apk.gypi target rigidly insists on having
467 # a java_in_dir directory, but complains about duplicate classes
468 # from the common cast_shell_java target (shared with internal APK)
469 # if the actual Java path is used.
470 # This will hopefully be removable after the great GN migration.
471 'java_in_dir': 'android',
472 'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
473 'package_name': 'org.chromium.chromecast.shell',
474 'native_lib_target': 'libcast_shell_android',
475 'asset_location': '<(PRODUCT_DIR)/assets',
476 'additional_input_paths': ['<(PRODUCT_DIR)/assets/cast_shell.pak'],
478 'includes': [ '../build/java_apk.gypi' ],
481 'target_name': 'cast_jni_headers',
484 'browser/android/apk/src/org/chromium/chromecast/shell/CastCrashHandler.java',
485 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java',
486 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowManager.java',
487 'browser/android/apk/src/org/chromium/chromecast/shell/ExternalVideoSurfaceContainer.java',
489 'direct_dependent_settings': {
491 '<(SHARED_INTERMEDIATE_DIR)/chromecast',
495 'jni_gen_package': 'chromecast',
497 'includes': [ '../build/jni_generator.gypi' ],
500 }, { # OS != "android"
503 'target_name': 'cast_shell_media',
504 'type': '<(component)',
506 'media/media.gyp:cast_media',
507 '../content/content.gyp:content',
508 '../ipc/ipc.gyp:ipc',
509 '../media/media.gyp:media',
512 'browser/media/cast_browser_cdm_factory.cc',
513 'browser/media/cast_browser_cdm_factory.h',
514 'browser/media/cma_message_filter_host.cc',
515 'browser/media/cma_message_filter_host.h',
516 'browser/media/cma_message_loop.cc',
517 'browser/media/cma_message_loop.h',
518 'browser/media/media_pipeline_host.cc',
519 'browser/media/media_pipeline_host.h',
520 'common/media/cma_ipc_common.h',
521 'common/media/cma_messages.h',
522 'common/media/cma_message_generator.cc',
523 'common/media/cma_message_generator.h',
524 'common/media/cma_param_traits.cc',
525 'common/media/cma_param_traits.h',
526 'common/media/shared_memory_chunk.cc',
527 'common/media/shared_memory_chunk.h',
528 'renderer/media/audio_pipeline_proxy.cc',
529 'renderer/media/audio_pipeline_proxy.h',
530 'renderer/media/chromecast_media_renderer_factory.cc',
531 'renderer/media/chromecast_media_renderer_factory.h',
532 'renderer/media/cma_message_filter_proxy.cc',
533 'renderer/media/cma_message_filter_proxy.h',
534 'renderer/media/media_channel_proxy.cc',
535 'renderer/media/media_channel_proxy.h',
536 'renderer/media/media_pipeline_proxy.cc',
537 'renderer/media/media_pipeline_proxy.h',
538 'renderer/media/video_pipeline_proxy.cc',
539 'renderer/media/video_pipeline_proxy.h',
541 }, # end of target 'cast_shell_media'
542 # This target contains all of the primary code of |cast_shell|, except
543 # for |main|. This allows end-to-end tests using |cast_shell|.
544 # This also includes all targets that cannot be built on Android.
546 'target_name': 'cast_shell_core',
547 '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 ['enable_default_cast_graphics==1', {
586 'target_name': 'libcast_graphics_1.0',
587 'type': 'shared_library',
592 'graphics/cast_egl_platform_default.cc',
593 'graphics/graphics_properties_default.cc'
598 ], # end of conditions