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',
48 'base/metrics/cast_histograms.h',
49 'base/metrics/cast_metrics_helper.cc',
50 'base/metrics/cast_metrics_helper.h',
51 'base/metrics/grouped_histogram.cc',
52 'base/metrics/grouped_histogram.h'
54 }, # end of target 'cast_base'
56 'target_name': 'cast_crash_client',
57 'type': '<(component)',
59 '../breakpad/breakpad.gyp:breakpad_client',
60 '../components/components.gyp:crash_component',
63 'crash/cast_crash_keys.cc',
64 'crash/cast_crash_keys.h',
65 'crash/cast_crash_reporter_client.cc',
66 'crash/cast_crash_reporter_client.h',
69 ['chromecast_branding=="Chrome"', {
71 '<(cast_internal_gyp):crash_internal',
75 'crash/cast_crash_reporter_client_simple.cc',
79 }, # end of target 'cast_crash_client'
81 'target_name': 'cast_net',
82 'type': '<(component)',
84 'net/connectivity_checker.cc',
85 'net/connectivity_checker.h',
86 'net/net_switches.cc',
91 'target_name': 'cast_shell_resources',
94 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chromecast',
98 'action_name': 'cast_shell_resources',
100 'grit_grd_file': 'app/resources/shell_resources.grd',
101 'grit_resource_ids': 'app/resources/resource_ids',
103 'includes': [ '../build/grit_action.gypi' ],
106 'includes': [ '../build/grit_target.gypi' ],
109 'target_name': 'cast_shell_pak',
112 'cast_shell_resources',
113 '../content/app/resources/content_resources.gyp:content_resources',
114 '../content/app/strings/content_strings.gyp:content_strings',
115 '../net/net.gyp:net_resources',
116 '../third_party/WebKit/public/blink_resources.gyp:blink_resources',
117 '../ui/resources/ui_resources.gyp:ui_resources',
118 '../ui/strings/ui_strings.gyp:ui_strings',
122 'action_name': 'repack_cast_shell_pak',
125 '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_resources_100_percent.pak',
126 '<(SHARED_INTERMEDIATE_DIR)/chromecast/shell_resources.pak',
127 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
128 '<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_100_percent.pak',
129 '<(SHARED_INTERMEDIATE_DIR)/content/app/strings/content_strings_en-US.pak',
130 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
131 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percent.pak',
132 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/webui_resources.pak',
133 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/app_locale_settings_en-US.pak',
134 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/ui_strings_en-US.pak',
137 ['chromecast_branding=="Chrome" and use_chromecast_webui==1', {
139 '<(SHARED_INTERMEDIATE_DIR)/chromecast/app_resources.pak',
140 '<(SHARED_INTERMEDIATE_DIR)/chromecast/cast_webui_resources.pak',
144 'pak_output': '<(PRODUCT_DIR)/assets/cast_shell.pak',
146 'includes': [ '../build/repack_action.gypi' ],
150 ['chromecast_branding=="Chrome" and use_chromecast_webui==1', {
152 'internal/chromecast_resources.gyp:chromecast_app_resources',
153 'internal/chromecast_resources.gyp:chromecast_webui_resources',
157 }, # end of target 'cast_shell_pak'
158 # This target contains all content-embedder implementation that is
159 # non-platform-specific.
161 'target_name': 'cast_shell_common',
162 'type': '<(component)',
168 'cast_shell_resources',
169 'cast_version_header',
170 'chromecast_locales.gyp:chromecast_locales_pak',
171 'chromecast_locales.gyp:chromecast_settings',
172 'media/media.gyp:media_base',
173 '../base/base.gyp:base',
174 '../components/components.gyp:breakpad_host',
175 '../components/components.gyp:cdm_renderer',
176 '../components/components.gyp:component_metrics_proto',
177 '../components/components.gyp:crash_component',
178 '../components/components.gyp:network_hints_browser',
179 '../components/components.gyp:network_hints_renderer',
180 '../components/components.gyp:metrics',
181 '../components/components.gyp:metrics_gpu',
182 '../components/components.gyp:metrics_net',
183 '../components/components.gyp:metrics_profiler',
184 '../content/content.gyp:content',
185 '../content/content.gyp:content_app_both',
186 '../skia/skia.gyp:skia',
187 '../third_party/WebKit/public/blink.gyp:blink',
188 '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
191 'app/cast_main_delegate.cc',
192 'app/cast_main_delegate.h',
193 'browser/cast_browser_context.cc',
194 'browser/cast_browser_context.h',
195 'browser/cast_browser_main_parts.cc',
196 'browser/cast_browser_main_parts.h',
197 'browser/cast_browser_process.cc',
198 'browser/cast_browser_process.h',
199 'browser/cast_content_browser_client.cc',
200 'browser/cast_content_browser_client.h',
201 'browser/cast_content_window.cc',
202 'browser/cast_content_window.h',
203 'browser/cast_download_manager_delegate.cc',
204 'browser/cast_download_manager_delegate.h',
205 'browser/cast_http_user_agent_settings.cc',
206 'browser/cast_http_user_agent_settings.h',
207 'browser/cast_network_delegate.cc',
208 'browser/cast_network_delegate.h',
209 'browser/cast_resource_dispatcher_host_delegate.cc',
210 'browser/cast_resource_dispatcher_host_delegate.h',
211 'browser/devtools/cast_dev_tools_delegate.cc',
212 'browser/devtools/cast_dev_tools_delegate.h',
213 'browser/devtools/remote_debugging_server.cc',
214 'browser/devtools/remote_debugging_server.h',
215 'browser/geolocation/cast_access_token_store.cc',
216 'browser/geolocation/cast_access_token_store.h',
217 'browser/metrics/cast_metrics_prefs.cc',
218 'browser/metrics/cast_metrics_prefs.h',
219 'browser/metrics/cast_metrics_service_client.cc',
220 'browser/metrics/cast_metrics_service_client.h',
221 'browser/metrics/cast_stability_metrics_provider.cc',
222 'browser/metrics/cast_stability_metrics_provider.h',
223 'browser/metrics/platform_metrics_providers.h',
224 'browser/pref_service_helper.cc',
225 'browser/pref_service_helper.h',
226 'browser/service/cast_service.cc',
227 'browser/service/cast_service.h',
228 'browser/url_request_context_factory.cc',
229 'browser/url_request_context_factory.h',
230 'common/cast_content_client.cc',
231 'common/cast_content_client.h',
232 'common/cast_paths.cc',
233 'common/cast_paths.h',
234 'common/cast_resource_delegate.cc',
235 'common/cast_resource_delegate.h',
236 'common/chromecast_switches.cc',
237 'common/chromecast_switches.h',
238 'common/media/cast_messages.h',
239 'common/media/cast_message_generator.cc',
240 'common/media/cast_message_generator.h',
241 'common/platform_client_auth.h',
242 'common/pref_names.cc',
243 'common/pref_names.h',
244 'renderer/cast_content_renderer_client.cc',
245 'renderer/cast_content_renderer_client.h',
246 'renderer/cast_media_load_deferrer.cc',
247 'renderer/cast_media_load_deferrer.h',
248 'renderer/cast_render_process_observer.cc',
249 'renderer/cast_render_process_observer.h',
250 'renderer/key_systems_cast.cc',
251 'renderer/key_systems_cast.h',
252 'renderer/media/capabilities_message_filter.cc',
253 'renderer/media/capabilities_message_filter.h',
256 ['chromecast_branding=="Chrome"', {
258 '<(cast_internal_gyp):cast_shell_internal',
262 'browser/cast_content_browser_client_simple.cc',
263 'browser/cast_network_delegate_simple.cc',
264 'browser/devtools/remote_debugging_server_simple.cc',
265 'browser/media/cast_browser_cdm_factory_simple.cc',
266 'browser/metrics/platform_metrics_providers_simple.cc',
267 'browser/pref_service_helper_simple.cc',
268 'common/platform_client_auth_simple.cc',
269 'renderer/cast_content_renderer_client_simple.cc',
270 'renderer/key_systems_cast_simple.cc',
275 'browser/service/cast_service_android.cc',
276 'browser/service/cast_service_android.h',
280 'browser/service/cast_service_simple.cc',
281 'browser/service/cast_service_simple.h',
286 # ExternalMetrics not necessary on Android and (as of this writing) uses
287 # non-portable filesystem operations. Also webcrypto is not used on
291 'browser/metrics/external_metrics.cc',
292 'browser/metrics/external_metrics.h',
295 '../components/components.gyp:metrics_serialization',
301 'target_name': 'cast_version_header',
303 'direct_dependent_settings': {
305 '<(SHARED_INTERMEDIATE_DIR)',
310 'action_name': 'version_header',
311 'message': 'Generating version header file: <@(_outputs)',
314 'common/version.h.in',
317 '<(SHARED_INTERMEDIATE_DIR)/chromecast/common/version.h',
321 '<(version_py_path)',
322 '-e', 'VERSION_FULL="<(version_full)"',
323 # CAST_BUILD_INCREMENTAL is taken from buildbot if available;
324 # otherwise, a dev string is used.
325 '-e', 'CAST_BUILD_INCREMENTAL="<!(echo ${CAST_BUILD_INCREMENTAL:="<!(date +%Y%m%d.%H%M%S)"})"',
326 # CAST_BUILD_RELEASE is taken from cast_build_release file if exist;
327 # otherwise, a dev string is used.
328 '-e', 'CAST_BUILD_RELEASE="<!(if test -f <(cast_build_release); then cat <(cast_build_release); else echo eng.${USER}; fi)"',
329 '-e', 'CAST_IS_DEBUG_BUILD=1 if "<(CONFIGURATION_NAME)" == "Debug" else 0',
330 'common/version.h.in',
334 '../build/util/version.gypi',
341 # Targets for Android receiver.
346 'target_name': 'cast_shell_icudata',
349 '../third_party/icu/icu.gyp:icudata',
352 'destination': '<(PRODUCT_DIR)/assets',
353 'files': ['<(PRODUCT_DIR)/icudtl.dat'],
357 'target_name': 'libcast_shell_android',
358 'type': 'shared_library',
362 'cast_shell_icudata',
364 'cast_version_header',
365 '../base/base.gyp:base',
366 '../breakpad/breakpad.gyp:breakpad_client',
367 '../components/components.gyp:breakpad_host',
368 '../components/components.gyp:crash_component',
369 '../content/content.gyp:content',
370 '../skia/skia.gyp:skia',
371 '../ui/gfx/gfx.gyp:gfx',
372 '../ui/gl/gl.gyp:gl',
378 'android/cast_jni_registrar.cc',
379 'android/cast_jni_registrar.h',
380 'android/chromecast_config_android.cc',
381 'android/chromecast_config_android.h',
382 'android/platform_jni_loader.h',
383 'app/android/cast_jni_loader.cc',
384 'browser/android/cast_window_android.cc',
385 'browser/android/cast_window_android.h',
386 'browser/android/cast_window_manager.cc',
387 'browser/android/cast_window_manager.h',
388 'browser/android/external_video_surface_container_impl.cc',
389 'browser/android/external_video_surface_container_impl.h',
390 'crash/android/cast_crash_reporter_client_android.cc',
391 'crash/android/cast_crash_reporter_client_android.h',
392 'crash/android/crash_handler.cc',
393 'crash/android/crash_handler.h',
396 ['chromecast_branding=="Chrome"', {
398 '<(cast_internal_gyp):cast_shell_android_internal'
402 'android/chromecast_config_android_stub.cc',
403 'android/platform_jni_loader_stub.cc',
407 }, # end of target 'libcast_shell_android'
409 'target_name': 'cast_shell_java',
412 '<(android_support_v13_target)',
413 '../base/base.gyp:base_java',
414 '../content/content.gyp:content_java',
415 '../media/media.gyp:media_java',
416 '../net/net.gyp:net_java',
417 '../ui/android/ui_android.gyp:ui_java',
420 'has_java_resources': 1,
421 'java_in_dir': 'browser/android/apk',
422 'resource_dir': 'browser/android/apk/res',
423 'R_package': 'org.chromium.chromecast.shell',
425 'includes': ['../build/java.gypi'],
426 }, # end of target 'cast_shell_java'
428 'target_name': 'cast_shell_manifest',
431 'jinja_inputs': ['browser/android/apk/AndroidManifest.xml.jinja2'],
432 'jinja_output': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
434 'includes': [ '../build/android/jinja_template.gypi' ],
437 'target_name': 'cast_shell_apk',
441 'libcast_shell_android',
444 'apk_name': 'CastShell',
445 'manifest_package_name': 'org.chromium.chromecast.shell',
446 # Note(gunsch): there are no Java files in the android/ directory.
447 # Unfortunately, the java_apk.gypi target rigidly insists on having
448 # a java_in_dir directory, but complains about duplicate classes
449 # from the common cast_shell_java target (shared with internal APK)
450 # if the actual Java path is used.
451 # This will hopefully be removable after the great GN migration.
452 'java_in_dir': 'android',
453 'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
454 'package_name': 'org.chromium.chromecast.shell',
455 'native_lib_target': 'libcast_shell_android',
456 'asset_location': '<(PRODUCT_DIR)/assets',
457 'additional_input_paths': ['<(PRODUCT_DIR)/assets/cast_shell.pak'],
459 'includes': [ '../build/java_apk.gypi' ],
462 'target_name': 'cast_jni_headers',
465 'browser/android/apk/src/org/chromium/chromecast/shell/CastCrashHandler.java',
466 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java',
467 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowManager.java',
468 'browser/android/apk/src/org/chromium/chromecast/shell/ExternalVideoSurfaceContainer.java',
470 'direct_dependent_settings': {
472 '<(SHARED_INTERMEDIATE_DIR)/chromecast',
476 'jni_gen_package': 'chromecast',
478 'includes': [ '../build/jni_generator.gypi' ],
481 }, { # OS != "android"
484 'target_name': 'cast_shell_media',
485 'type': '<(component)',
487 'media/media.gyp:cast_media',
488 '../content/content.gyp:content',
489 '../ipc/ipc.gyp:ipc',
490 '../media/media.gyp:media',
493 'browser/media/cast_browser_cdm_factory.cc',
494 'browser/media/cast_browser_cdm_factory.h',
495 'browser/media/cma_message_filter_host.cc',
496 'browser/media/cma_message_filter_host.h',
497 'browser/media/cma_message_loop.cc',
498 'browser/media/cma_message_loop.h',
499 'browser/media/media_pipeline_host.cc',
500 'browser/media/media_pipeline_host.h',
501 'common/media/cma_ipc_common.h',
502 'common/media/cma_messages.h',
503 'common/media/cma_message_generator.cc',
504 'common/media/cma_message_generator.h',
505 'common/media/cma_param_traits.cc',
506 'common/media/cma_param_traits.h',
507 'common/media/shared_memory_chunk.cc',
508 'common/media/shared_memory_chunk.h',
509 'renderer/media/audio_pipeline_proxy.cc',
510 'renderer/media/audio_pipeline_proxy.h',
511 'renderer/media/chromecast_media_renderer_factory.cc',
512 'renderer/media/chromecast_media_renderer_factory.h',
513 'renderer/media/cma_message_filter_proxy.cc',
514 'renderer/media/cma_message_filter_proxy.h',
515 'renderer/media/media_channel_proxy.cc',
516 'renderer/media/media_channel_proxy.h',
517 'renderer/media/media_pipeline_proxy.cc',
518 'renderer/media/media_pipeline_proxy.h',
519 'renderer/media/video_pipeline_proxy.cc',
520 'renderer/media/video_pipeline_proxy.h',
522 }, # end of target 'cast_shell_media'
523 # This target contains all of the primary code of |cast_shell|, except
524 # for |main|. This allows end-to-end tests using |cast_shell|.
525 # This also includes all targets that cannot be built on Android.
527 'target_name': 'cast_shell_core',
528 'type': '<(component)',
532 'media/media.gyp:cast_media',
533 '../ui/aura/aura.gyp:aura_test_support',
536 ['chromecast_branding=="Chrome"', {
538 '<(cast_internal_gyp):cast_gfx_internal',
542 '../ui/ozone/ozone.gyp:eglplatform_shim_x11',
548 'target_name': 'cast_shell',
549 'type': 'executable',
556 # TODO(dougsteed): remove when Chromecast moves to boringssl.
557 # Allow the cast shell to find the NSS module in the same directory.
559 '-Wl,-rpath=\$$ORIGIN'
564 ], # end of conditions