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 # TODO(gunsch): Remove this fake target once it's either added or no
30 # longer referenced from internal code.
31 {'target_name': 'cast_media_audio', 'type': 'none'},
34 'target_name': 'cast_base',
35 'type': '<(component)',
37 '../base/base.gyp:base',
40 'base/metrics/cast_histograms.h',
41 'base/metrics/cast_metrics_helper.cc',
42 'base/metrics/cast_metrics_helper.h',
43 'base/metrics/grouped_histogram.cc',
44 'base/metrics/grouped_histogram.h'
46 }, # end of target 'cast_base'
48 'target_name': 'cast_crash_client',
49 'type': '<(component)',
51 '../breakpad/breakpad.gyp:breakpad_client',
52 '../components/components.gyp:crash_component',
55 'crash/cast_crash_keys.cc',
56 'crash/cast_crash_keys.h',
57 'crash/cast_crash_reporter_client.cc',
58 'crash/cast_crash_reporter_client.h',
61 ['chromecast_branding=="Chrome"', {
63 '<(cast_internal_gyp):crash_internal',
67 'crash/cast_crash_reporter_client_simple.cc',
71 }, # end of target 'cast_crash_client'
73 'target_name': 'cast_net',
74 'type': '<(component)',
76 'net/connectivity_checker.cc',
77 'net/connectivity_checker.h',
78 'net/net_switches.cc',
83 'target_name': 'cast_shell_resources',
86 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chromecast',
90 'action_name': 'cast_shell_resources',
92 'grit_grd_file': 'app/resources/shell_resources.grd',
93 'grit_resource_ids': 'app/resources/resource_ids',
95 'includes': [ '../build/grit_action.gypi' ],
98 'includes': [ '../build/grit_target.gypi' ],
101 'target_name': 'cast_shell_pak',
104 'cast_shell_resources',
105 '../content/app/resources/content_resources.gyp:content_resources',
106 '../content/app/strings/content_strings.gyp:content_strings',
107 '../net/net.gyp:net_resources',
108 '../third_party/WebKit/public/blink_resources.gyp:blink_resources',
109 '../ui/resources/ui_resources.gyp:ui_resources',
110 '../ui/strings/ui_strings.gyp:ui_strings',
114 'action_name': 'repack_cast_shell_pak',
117 '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_resources.pak',
118 '<(SHARED_INTERMEDIATE_DIR)/chromecast/shell_resources.pak',
119 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
120 '<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_100_percent.pak',
121 '<(SHARED_INTERMEDIATE_DIR)/content/app/strings/content_strings_en-US.pak',
122 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
123 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percent.pak',
124 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/webui_resources.pak',
125 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/app_locale_settings_en-US.pak',
126 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/ui_strings_en-US.pak',
129 ['chromecast_branding=="Chrome" and use_chromecast_webui==1', {
131 '<(SHARED_INTERMEDIATE_DIR)/chromecast/app_resources.pak',
132 '<(SHARED_INTERMEDIATE_DIR)/chromecast/cast_webui_resources.pak',
136 'pak_output': '<(PRODUCT_DIR)/assets/cast_shell.pak',
138 'includes': [ '../build/repack_action.gypi' ],
142 ['chromecast_branding=="Chrome" and use_chromecast_webui==1', {
144 'internal/chromecast_resources.gyp:chromecast_app_resources',
145 'internal/chromecast_resources.gyp:chromecast_webui_resources',
149 }, # end of target 'cast_shell_pak'
150 # This target contains all content-embedder implementation that is
151 # non-platform-specific.
153 'target_name': 'cast_shell_common',
154 'type': '<(component)',
160 'cast_shell_resources',
161 'cast_version_header',
162 'chromecast_locales.gyp:chromecast_locales_pak',
163 'chromecast_locales.gyp:chromecast_settings',
164 'media/media.gyp:media_base',
165 '../base/base.gyp:base',
166 '../components/components.gyp:breakpad_host',
167 '../components/components.gyp:cdm_renderer',
168 '../components/components.gyp:component_metrics_proto',
169 '../components/components.gyp:crash_component',
170 '../components/components.gyp:network_hints_browser',
171 '../components/components.gyp:network_hints_renderer',
172 '../components/components.gyp:metrics',
173 '../components/components.gyp:metrics_gpu',
174 '../components/components.gyp:metrics_net',
175 '../components/components.gyp:metrics_profiler',
176 '../content/content.gyp:content',
177 '../content/content.gyp:content_app_both',
178 '../skia/skia.gyp:skia',
179 '../third_party/WebKit/public/blink.gyp:blink',
180 '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
183 'app/cast_main_delegate.cc',
184 'app/cast_main_delegate.h',
185 'browser/cast_browser_context.cc',
186 'browser/cast_browser_context.h',
187 'browser/cast_browser_main_parts.cc',
188 'browser/cast_browser_main_parts.h',
189 'browser/cast_browser_process.cc',
190 'browser/cast_browser_process.h',
191 'browser/cast_content_browser_client.cc',
192 'browser/cast_content_browser_client.h',
193 'browser/cast_content_window.cc',
194 'browser/cast_content_window.h',
195 'browser/cast_download_manager_delegate.cc',
196 'browser/cast_download_manager_delegate.h',
197 'browser/cast_http_user_agent_settings.cc',
198 'browser/cast_http_user_agent_settings.h',
199 'browser/cast_network_delegate.cc',
200 'browser/cast_network_delegate.h',
201 'browser/cast_resource_dispatcher_host_delegate.cc',
202 'browser/cast_resource_dispatcher_host_delegate.h',
203 'browser/devtools/cast_dev_tools_delegate.cc',
204 'browser/devtools/cast_dev_tools_delegate.h',
205 'browser/devtools/remote_debugging_server.cc',
206 'browser/devtools/remote_debugging_server.h',
207 'browser/geolocation/cast_access_token_store.cc',
208 'browser/geolocation/cast_access_token_store.h',
209 'browser/metrics/cast_metrics_prefs.cc',
210 'browser/metrics/cast_metrics_prefs.h',
211 'browser/metrics/cast_metrics_service_client.cc',
212 'browser/metrics/cast_metrics_service_client.h',
213 'browser/metrics/cast_stability_metrics_provider.cc',
214 'browser/metrics/cast_stability_metrics_provider.h',
215 'browser/metrics/platform_metrics_providers.h',
216 'browser/pref_service_helper.cc',
217 'browser/pref_service_helper.h',
218 'browser/service/cast_service.cc',
219 'browser/service/cast_service.h',
220 'browser/url_request_context_factory.cc',
221 'browser/url_request_context_factory.h',
222 'common/cast_content_client.cc',
223 'common/cast_content_client.h',
224 'common/cast_paths.cc',
225 'common/cast_paths.h',
226 'common/cast_resource_delegate.cc',
227 'common/cast_resource_delegate.h',
228 'common/chromecast_switches.cc',
229 'common/chromecast_switches.h',
230 'common/media/cast_messages.h',
231 'common/media/cast_message_generator.cc',
232 'common/media/cast_message_generator.h',
233 'common/platform_client_auth.h',
234 'common/pref_names.cc',
235 'common/pref_names.h',
236 'renderer/cast_content_renderer_client.cc',
237 'renderer/cast_content_renderer_client.h',
238 'renderer/cast_media_load_deferrer.cc',
239 'renderer/cast_media_load_deferrer.h',
240 'renderer/cast_render_process_observer.cc',
241 'renderer/cast_render_process_observer.h',
242 'renderer/key_systems_cast.cc',
243 'renderer/key_systems_cast.h',
244 'renderer/media/capabilities_message_filter.cc',
245 'renderer/media/capabilities_message_filter.h',
248 ['chromecast_branding=="Chrome"', {
250 '<(cast_internal_gyp):cast_shell_internal',
254 'browser/cast_content_browser_client_simple.cc',
255 'browser/cast_network_delegate_simple.cc',
256 'browser/devtools/remote_debugging_server_simple.cc',
257 'browser/media/cast_browser_cdm_factory_simple.cc',
258 'browser/metrics/platform_metrics_providers_simple.cc',
259 'browser/pref_service_helper_simple.cc',
260 'common/platform_client_auth_simple.cc',
261 'renderer/cast_content_renderer_client_simple.cc',
262 'renderer/key_systems_cast_simple.cc',
267 'browser/service/cast_service_android.cc',
268 'browser/service/cast_service_android.h',
272 'browser/service/cast_service_simple.cc',
273 'browser/service/cast_service_simple.h',
278 # ExternalMetrics not necessary on Android and (as of this writing) uses
279 # non-portable filesystem operations. Also webcrypto is not used on
283 'browser/metrics/external_metrics.cc',
284 'browser/metrics/external_metrics.h',
287 '../components/components.gyp:metrics_serialization',
293 'target_name': 'cast_version_header',
295 'direct_dependent_settings': {
297 '<(SHARED_INTERMEDIATE_DIR)',
302 'action_name': 'version_header',
303 'message': 'Generating version header file: <@(_outputs)',
306 'common/version.h.in',
309 '<(SHARED_INTERMEDIATE_DIR)/chromecast/common/version.h',
313 '<(version_py_path)',
314 '-e', 'VERSION_FULL="<(version_full)"',
315 # CAST_BUILD_INCREMENTAL is taken from buildbot if available;
316 # otherwise, a dev string is used.
317 '-e', 'CAST_BUILD_INCREMENTAL="<!(echo ${CAST_BUILD_INCREMENTAL:="<!(date +%Y%m%d.%H%M%S)"})"',
318 # CAST_BUILD_RELEASE is taken from cast_build_release file if exist;
319 # otherwise, a dev string is used.
320 '-e', 'CAST_BUILD_RELEASE="<!(if test -f <(cast_build_release); then cat <(cast_build_release); else echo eng.${USER}; fi)"',
321 '-e', 'CAST_IS_DEBUG_BUILD=1 if "<(CONFIGURATION_NAME)" == "Debug" else 0',
322 'common/version.h.in',
326 '../build/util/version.gypi',
333 # Targets for Android receiver.
338 'target_name': 'cast_shell_icudata',
341 '../third_party/icu/icu.gyp:icudata',
344 'destination': '<(PRODUCT_DIR)/assets',
345 'files': ['<(PRODUCT_DIR)/icudtl.dat'],
349 'target_name': 'libcast_shell_android',
350 'type': 'shared_library',
354 'cast_shell_icudata',
356 'cast_version_header',
357 '../base/base.gyp:base',
358 '../breakpad/breakpad.gyp:breakpad_client',
359 '../components/components.gyp:breakpad_host',
360 '../components/components.gyp:crash_component',
361 '../content/content.gyp:content',
362 '../skia/skia.gyp:skia',
363 '../ui/gfx/gfx.gyp:gfx',
364 '../ui/gl/gl.gyp:gl',
370 'android/cast_jni_registrar.cc',
371 'android/cast_jni_registrar.h',
372 'android/chromecast_config_android.cc',
373 'android/chromecast_config_android.h',
374 'android/platform_jni_loader.h',
375 'app/android/cast_jni_loader.cc',
376 'browser/android/cast_window_android.cc',
377 'browser/android/cast_window_android.h',
378 'browser/android/cast_window_manager.cc',
379 'browser/android/cast_window_manager.h',
380 'browser/android/external_video_surface_container_impl.cc',
381 'browser/android/external_video_surface_container_impl.h',
382 'crash/android/cast_crash_reporter_client_android.cc',
383 'crash/android/cast_crash_reporter_client_android.h',
384 'crash/android/crash_handler.cc',
385 'crash/android/crash_handler.h',
388 ['chromecast_branding=="Chrome"', {
390 '<(cast_internal_gyp):cast_shell_android_internal'
394 'android/chromecast_config_android_stub.cc',
395 'android/platform_jni_loader_stub.cc',
399 }, # end of target 'libcast_shell_android'
401 'target_name': 'cast_shell_java',
404 '<(android_support_v13_target)',
405 '../base/base.gyp:base_java',
406 '../content/content.gyp:content_java',
407 '../media/media.gyp:media_java',
408 '../net/net.gyp:net_java',
409 '../ui/android/ui_android.gyp:ui_java',
412 'has_java_resources': 1,
413 'java_in_dir': 'browser/android/apk',
414 'resource_dir': 'browser/android/apk/res',
415 'R_package': 'org.chromium.chromecast.shell',
417 'includes': ['../build/java.gypi'],
418 }, # end of target 'cast_shell_java'
420 'target_name': 'cast_shell_manifest',
423 'jinja_inputs': ['browser/android/apk/AndroidManifest.xml.jinja2'],
424 'jinja_output': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
426 'includes': [ '../build/android/jinja_template.gypi' ],
429 'target_name': 'cast_shell_apk',
433 'libcast_shell_android',
436 'apk_name': 'CastShell',
437 'manifest_package_name': 'org.chromium.chromecast.shell',
438 # Note(gunsch): there are no Java files in the android/ directory.
439 # Unfortunately, the java_apk.gypi target rigidly insists on having
440 # a java_in_dir directory, but complains about duplicate classes
441 # from the common cast_shell_java target (shared with internal APK)
442 # if the actual Java path is used.
443 # This will hopefully be removable after the great GN migration.
444 'java_in_dir': 'android',
445 'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
446 'package_name': 'org.chromium.chromecast.shell',
447 'native_lib_target': 'libcast_shell_android',
448 'asset_location': '<(PRODUCT_DIR)/assets',
449 'additional_input_paths': ['<(PRODUCT_DIR)/assets/cast_shell.pak'],
451 'includes': [ '../build/java_apk.gypi' ],
454 'target_name': 'cast_jni_headers',
457 'browser/android/apk/src/org/chromium/chromecast/shell/CastCrashHandler.java',
458 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java',
459 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowManager.java',
460 'browser/android/apk/src/org/chromium/chromecast/shell/ExternalVideoSurfaceContainer.java',
462 'direct_dependent_settings': {
464 '<(SHARED_INTERMEDIATE_DIR)/chromecast',
468 'jni_gen_package': 'chromecast',
470 'includes': [ '../build/jni_generator.gypi' ],
473 }, { # OS != "android"
476 'target_name': 'cast_shell_media',
477 'type': '<(component)',
479 'media/media.gyp:cast_media',
480 '../content/content.gyp:content',
481 '../ipc/ipc.gyp:ipc',
482 '../media/media.gyp:media',
485 'browser/media/cast_browser_cdm_factory.cc',
486 'browser/media/cast_browser_cdm_factory.h',
487 'browser/media/cma_message_filter_host.cc',
488 'browser/media/cma_message_filter_host.h',
489 'browser/media/cma_message_loop.cc',
490 'browser/media/cma_message_loop.h',
491 'browser/media/media_pipeline_host.cc',
492 'browser/media/media_pipeline_host.h',
493 'common/media/cma_ipc_common.h',
494 'common/media/cma_messages.h',
495 'common/media/cma_message_generator.cc',
496 'common/media/cma_message_generator.h',
497 'common/media/cma_param_traits.cc',
498 'common/media/cma_param_traits.h',
499 'common/media/shared_memory_chunk.cc',
500 'common/media/shared_memory_chunk.h',
501 'renderer/media/audio_pipeline_proxy.cc',
502 'renderer/media/audio_pipeline_proxy.h',
503 'renderer/media/chromecast_media_renderer_factory.cc',
504 'renderer/media/chromecast_media_renderer_factory.h',
505 'renderer/media/cma_message_filter_proxy.cc',
506 'renderer/media/cma_message_filter_proxy.h',
507 'renderer/media/media_channel_proxy.cc',
508 'renderer/media/media_channel_proxy.h',
509 'renderer/media/media_pipeline_proxy.cc',
510 'renderer/media/media_pipeline_proxy.h',
511 'renderer/media/video_pipeline_proxy.cc',
512 'renderer/media/video_pipeline_proxy.h',
514 }, # end of target 'cast_shell_media'
515 # This target contains all of the primary code of |cast_shell|, except
516 # for |main|. This allows end-to-end tests using |cast_shell|.
517 # This also includes all targets that cannot be built on Android.
519 'target_name': 'cast_shell_core',
520 'type': '<(component)',
524 'media/media.gyp:cast_media',
525 '../ui/aura/aura.gyp:aura_test_support',
528 ['chromecast_branding=="Chrome"', {
530 '<(cast_internal_gyp):cast_gfx_internal',
534 '../ui/ozone/ozone.gyp:eglplatform_shim_x11',
540 'target_name': 'cast_shell',
541 'type': 'executable',
548 # TODO(dougsteed): remove when Chromecast moves to boringssl.
549 # Allow the cast shell to find the NSS module in the same directory.
551 '-Wl,-rpath=\$$ORIGIN'
556 ], # end of conditions