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:devtools_http_handler',
190 '../components/components.gyp:network_hints_browser',
191 '../components/components.gyp:network_hints_renderer',
192 '../components/components.gyp:metrics',
193 '../components/components.gyp:metrics_gpu',
194 '../components/components.gyp:metrics_net',
195 '../components/components.gyp:metrics_profiler',
196 '../content/content.gyp:content',
197 '../content/content.gyp:content_app_both',
198 '../skia/skia.gyp:skia',
199 '../third_party/WebKit/public/blink.gyp:blink',
200 '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
203 'app/cast_main_delegate.cc',
204 'app/cast_main_delegate.h',
205 'browser/cast_browser_context.cc',
206 'browser/cast_browser_context.h',
207 'browser/cast_browser_main_parts.cc',
208 'browser/cast_browser_main_parts.h',
209 'browser/cast_browser_process.cc',
210 'browser/cast_browser_process.h',
211 'browser/cast_content_browser_client.cc',
212 'browser/cast_content_browser_client.h',
213 'browser/cast_content_window.cc',
214 'browser/cast_content_window.h',
215 'browser/cast_download_manager_delegate.cc',
216 'browser/cast_download_manager_delegate.h',
217 'browser/cast_http_user_agent_settings.cc',
218 'browser/cast_http_user_agent_settings.h',
219 'browser/cast_network_delegate.cc',
220 'browser/cast_network_delegate.h',
221 'browser/cast_permission_manager.cc',
222 'browser/cast_permission_manager.h',
223 'browser/cast_quota_permission_context.cc',
224 'browser/cast_quota_permission_context.h',
225 'browser/cast_resource_dispatcher_host_delegate.cc',
226 'browser/cast_resource_dispatcher_host_delegate.h',
227 'browser/devtools/cast_dev_tools_delegate.cc',
228 'browser/devtools/cast_dev_tools_delegate.h',
229 'browser/devtools/remote_debugging_server.cc',
230 'browser/devtools/remote_debugging_server.h',
231 'browser/geolocation/cast_access_token_store.cc',
232 'browser/geolocation/cast_access_token_store.h',
233 'browser/metrics/cast_metrics_prefs.cc',
234 'browser/metrics/cast_metrics_prefs.h',
235 'browser/metrics/cast_metrics_service_client.cc',
236 'browser/metrics/cast_metrics_service_client.h',
237 'browser/metrics/cast_stability_metrics_provider.cc',
238 'browser/metrics/cast_stability_metrics_provider.h',
239 'browser/metrics/platform_metrics_providers.h',
240 'browser/pref_service_helper.cc',
241 'browser/pref_service_helper.h',
242 'browser/service/cast_service.cc',
243 'browser/service/cast_service.h',
244 'browser/url_request_context_factory.cc',
245 'browser/url_request_context_factory.h',
246 'common/cast_content_client.cc',
247 'common/cast_content_client.h',
248 'common/cast_resource_delegate.cc',
249 'common/cast_resource_delegate.h',
250 'common/chromecast_switches.cc',
251 'common/chromecast_switches.h',
252 'common/media/cast_messages.h',
253 'common/media/cast_message_generator.cc',
254 'common/media/cast_message_generator.h',
255 'common/platform_client_auth.h',
256 'common/pref_names.cc',
257 'common/pref_names.h',
258 'renderer/cast_content_renderer_client.cc',
259 'renderer/cast_content_renderer_client.h',
260 'renderer/cast_media_load_deferrer.cc',
261 'renderer/cast_media_load_deferrer.h',
262 'renderer/cast_render_process_observer.cc',
263 'renderer/cast_render_process_observer.h',
264 'renderer/key_systems_cast.cc',
265 'renderer/key_systems_cast.h',
266 'renderer/media/capabilities_message_filter.cc',
267 'renderer/media/capabilities_message_filter.h',
270 ['chromecast_branding=="Chrome"', {
272 'internal/chromecast_internal.gyp:cast_shell_internal',
276 'browser/cast_content_browser_client_simple.cc',
277 'browser/cast_network_delegate_simple.cc',
278 'browser/devtools/remote_debugging_server_simple.cc',
279 'browser/metrics/platform_metrics_providers_simple.cc',
280 'browser/pref_service_helper_simple.cc',
281 'common/platform_client_auth_simple.cc',
282 'renderer/cast_content_renderer_client_simple.cc',
283 'renderer/key_systems_cast_simple.cc',
288 'browser/service/cast_service_android.cc',
289 'browser/service/cast_service_android.h',
293 'browser/media/cast_browser_cdm_factory_simple.cc',
294 'browser/service/cast_service_simple.cc',
295 'browser/service/cast_service_simple.h',
300 # ExternalMetrics not necessary on Android and (as of this writing) uses
301 # non-portable filesystem operations. Also webcrypto is not used on
305 'browser/metrics/external_metrics.cc',
306 'browser/metrics/external_metrics.h',
309 '../components/components.gyp:metrics_serialization',
310 '../ui/aura/aura.gyp:aura_test_support',
316 'target_name': 'cast_version_header',
318 'direct_dependent_settings': {
320 '<(SHARED_INTERMEDIATE_DIR)',
325 'action_name': 'version_header',
326 'message': 'Generating version header file: <@(_outputs)',
329 'common/version.h.in',
332 '<(SHARED_INTERMEDIATE_DIR)/chromecast/common/version.h',
336 '<(version_py_path)',
337 '-e', 'VERSION_FULL="<(version_full)"',
338 # CAST_BUILD_INCREMENTAL is taken from buildbot if available;
339 # otherwise, a dev string is used.
340 '-e', 'CAST_BUILD_INCREMENTAL="<!(echo ${CAST_BUILD_INCREMENTAL:="<!(date +%Y%m%d.%H%M%S)"})"',
341 # CAST_BUILD_RELEASE is taken from cast_build_release file if exist;
342 # otherwise, a dev string is used.
343 '-e', 'CAST_BUILD_RELEASE="<!(if test -f <(cast_build_release); then cat <(cast_build_release); else echo eng.${USER}; fi)"',
344 '-e', 'CAST_IS_DEBUG_BUILD=1 if "<(CONFIGURATION_NAME)" == "Debug" or <(cast_is_debug_build) == 1 else 0',
345 '-e', 'CAST_PRODUCT_TYPE=<(cast_product_type)',
346 'common/version.h.in',
350 '../build/util/version.gypi',
357 # Targets for Android receiver.
362 'target_name': 'cast_shell_icudata',
365 '../third_party/icu/icu.gyp:icudata',
366 '../v8/tools/gyp/v8.gyp:v8_external_snapshot',
369 'destination': '<(PRODUCT_DIR)/assets',
371 '<(PRODUCT_DIR)/icudtl.dat',
372 '<(PRODUCT_DIR)/natives_blob.bin',
373 '<(PRODUCT_DIR)/snapshot_blob.bin',
378 'target_name': 'libcast_shell_android',
379 'type': 'shared_library',
383 'cast_shell_icudata',
385 'cast_version_header',
386 '../base/base.gyp:base',
387 '../breakpad/breakpad.gyp:breakpad_client',
388 '../components/components.gyp:breakpad_host',
389 '../components/components.gyp:crash_component',
390 '../content/content.gyp:content',
391 '../skia/skia.gyp:skia',
392 '../ui/gfx/gfx.gyp:gfx',
393 '../ui/gl/gl.gyp:gl',
399 'android/cast_jni_registrar.cc',
400 'android/cast_jni_registrar.h',
401 'android/chromecast_config_android.cc',
402 'android/chromecast_config_android.h',
403 'android/platform_jni_loader.h',
404 'app/android/cast_jni_loader.cc',
405 'browser/android/cast_window_android.cc',
406 'browser/android/cast_window_android.h',
407 'browser/android/cast_window_manager.cc',
408 'browser/android/cast_window_manager.h',
409 'browser/android/external_video_surface_container_impl.cc',
410 'browser/android/external_video_surface_container_impl.h',
411 'crash/android/cast_crash_reporter_client_android.cc',
412 'crash/android/cast_crash_reporter_client_android.h',
413 'crash/android/crash_handler.cc',
414 'crash/android/crash_handler.h',
417 ['chromecast_branding=="Chrome"', {
419 'internal/chromecast_internal.gyp:cast_shell_android_internal'
423 'android/chromecast_config_android_stub.cc',
424 'android/platform_jni_loader_stub.cc',
428 }, # end of target 'libcast_shell_android'
430 'target_name': 'cast_shell_java',
433 '<(android_support_v13_target)',
434 '../base/base.gyp:base_java',
435 '../content/content.gyp:content_java',
436 '../media/media.gyp:media_java',
437 '../net/net.gyp:net_java',
438 '../ui/android/ui_android.gyp:ui_java',
441 'has_java_resources': 1,
442 'java_in_dir': 'browser/android/apk',
443 'resource_dir': 'browser/android/apk/res',
444 'R_package': 'org.chromium.chromecast.shell',
446 'includes': ['../build/java.gypi'],
447 }, # end of target 'cast_shell_java'
449 'target_name': 'cast_shell_manifest',
452 'jinja_inputs': ['browser/android/apk/AndroidManifest.xml.jinja2'],
453 'jinja_output': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
455 'includes': [ '../build/android/jinja_template.gypi' ],
458 'target_name': 'cast_shell_apk',
462 'libcast_shell_android',
465 'apk_name': 'CastShell',
466 'manifest_package_name': 'org.chromium.chromecast.shell',
467 # Note(gunsch): there are no Java files in the android/ directory.
468 # Unfortunately, the java_apk.gypi target rigidly insists on having
469 # a java_in_dir directory, but complains about duplicate classes
470 # from the common cast_shell_java target (shared with internal APK)
471 # if the actual Java path is used.
472 # This will hopefully be removable after the great GN migration.
473 'java_in_dir': 'android',
474 'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
475 'package_name': 'org.chromium.chromecast.shell',
476 'native_lib_target': 'libcast_shell_android',
477 'asset_location': '<(PRODUCT_DIR)/assets',
478 'additional_input_paths': ['<(PRODUCT_DIR)/assets/cast_shell.pak'],
480 'includes': [ '../build/java_apk.gypi' ],
483 'target_name': 'cast_jni_headers',
486 'browser/android/apk/src/org/chromium/chromecast/shell/CastCrashHandler.java',
487 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java',
488 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowManager.java',
489 'browser/android/apk/src/org/chromium/chromecast/shell/ExternalVideoSurfaceContainer.java',
491 'direct_dependent_settings': {
493 '<(SHARED_INTERMEDIATE_DIR)/chromecast',
497 'jni_gen_package': 'chromecast',
499 'includes': [ '../build/jni_generator.gypi' ],
502 }, { # OS != "android"
505 'target_name': 'cast_shell_media',
506 'type': '<(component)',
508 'media/media.gyp:cast_media',
509 '../content/content.gyp:content',
510 '../ipc/ipc.gyp:ipc',
511 '../media/media.gyp:media',
514 'browser/media/cast_browser_cdm_factory.cc',
515 'browser/media/cast_browser_cdm_factory.h',
516 'browser/media/cma_message_filter_host.cc',
517 'browser/media/cma_message_filter_host.h',
518 'browser/media/cma_message_loop.cc',
519 'browser/media/cma_message_loop.h',
520 'browser/media/media_pipeline_host.cc',
521 'browser/media/media_pipeline_host.h',
522 'common/media/cma_ipc_common.h',
523 'common/media/cma_messages.h',
524 'common/media/cma_message_generator.cc',
525 'common/media/cma_message_generator.h',
526 'common/media/cma_param_traits.cc',
527 'common/media/cma_param_traits.h',
528 'common/media/shared_memory_chunk.cc',
529 'common/media/shared_memory_chunk.h',
530 'renderer/media/audio_pipeline_proxy.cc',
531 'renderer/media/audio_pipeline_proxy.h',
532 'renderer/media/chromecast_media_renderer_factory.cc',
533 'renderer/media/chromecast_media_renderer_factory.h',
534 'renderer/media/cma_message_filter_proxy.cc',
535 'renderer/media/cma_message_filter_proxy.h',
536 'renderer/media/media_channel_proxy.cc',
537 'renderer/media/media_channel_proxy.h',
538 'renderer/media/media_pipeline_proxy.cc',
539 'renderer/media/media_pipeline_proxy.h',
540 'renderer/media/video_pipeline_proxy.cc',
541 'renderer/media/video_pipeline_proxy.h',
543 }, # end of target 'cast_shell_media'
544 # This target contains all of the primary code of |cast_shell|, except
545 # for |main|. This allows end-to-end tests using |cast_shell|.
546 # This also includes all targets that cannot be built on Android.
548 'target_name': 'cast_shell_core',
549 'type': '<(component)',
553 'media/media.gyp:cast_media',
556 ['chromecast_branding=="Chrome"', {
558 'internal/chromecast_internal.gyp:cast_gfx_internal',
562 '../ui/ozone/ozone.gyp:eglplatform_shim_x11',
568 'target_name': 'cast_shell',
569 'type': 'executable',
576 # TODO(dougsteed): remove when Chromecast moves to boringssl.
577 # Allow the cast shell to find the NSS module in the same directory.
579 '-Wl,-rpath=\$$ORIGIN'
584 ['enable_default_cast_graphics==1', {
587 'target_name': 'libcast_graphics_1.0',
588 'type': 'shared_library',
593 'graphics/cast_egl_platform_default.cc',
594 'graphics/graphics_properties_default.cc'
599 ], # end of conditions