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,
15 'chromecast_tests.gypi',
19 '..', # Root of Chromium checkout
22 ['disable_display==1', {
23 'defines': ['DISABLE_DISPLAY'],
28 # TODO(gunsch): Remove these fake targets once they're either added or no
29 # longer referenced from internal code.
30 {'target_name': 'cast_media_audio', 'type': 'none'},
31 {'target_name': 'cast_port_impl', '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_reporter_client.cc',
56 'crash/cast_crash_reporter_client.h',
59 ['chromecast_branding=="Chrome"', {
61 '<(cast_internal_gyp):crash_internal',
65 'crash/cast_crash_reporter_client_simple.cc',
69 }, # end of target 'cast_crash_client'
71 'target_name': 'cast_net',
72 'type': '<(component)',
74 'net/network_change_notifier_cast.cc',
75 'net/network_change_notifier_cast.h',
76 'net/network_change_notifier_factory_cast.cc',
77 'net/network_change_notifier_factory_cast.h',
81 'target_name': 'cast_shell_resources',
84 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chromecast',
88 'action_name': 'cast_shell_resources',
90 'grit_grd_file': 'app/resources/shell_resources.grd',
91 'grit_resource_ids': 'app/resources/resource_ids',
93 'includes': [ '../build/grit_action.gypi' ],
96 'includes': [ '../build/grit_target.gypi' ],
99 'target_name': 'cast_shell_pak',
102 'cast_shell_resources',
103 '../content/app/resources/content_resources.gyp:content_resources',
104 '../content/app/strings/content_strings.gyp:content_strings',
105 '../net/net.gyp:net_resources',
106 '../third_party/WebKit/public/blink_resources.gyp:blink_resources',
107 '../ui/resources/ui_resources.gyp:ui_resources',
108 '../ui/strings/ui_strings.gyp:ui_strings',
112 'action_name': 'repack_cast_shell_pack',
115 '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_resources.pak',
116 '<(SHARED_INTERMEDIATE_DIR)/chromecast/shell_resources.pak',
117 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
118 '<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_100_percent.pak',
119 '<(SHARED_INTERMEDIATE_DIR)/content/app/strings/content_strings_en-US.pak',
120 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
121 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percent.pak',
122 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/webui_resources.pak',
123 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/app_locale_settings_en-US.pak',
124 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/ui_strings_en-US.pak',
126 'pak_output': '<(PRODUCT_DIR)/assets/cast_shell.pak',
128 'includes': [ '../build/repack_action.gypi' ],
132 # This target contains all content-embedder implementation that is
133 # non-platform-specific.
135 'target_name': 'cast_shell_common',
136 'type': '<(component)',
141 'cast_shell_resources',
142 'cast_version_header',
143 'chromecast_locales.gyp:chromecast_locales_pak',
144 'chromecast_locales.gyp:chromecast_settings',
145 'media/media.gyp:media_base',
146 '../base/base.gyp:base',
147 '../components/components.gyp:breakpad_host',
148 '../components/components.gyp:cdm_renderer',
149 '../components/components.gyp:component_metrics_proto',
150 '../components/components.gyp:crash_component',
151 '../components/components.gyp:network_hints_browser',
152 '../components/components.gyp:network_hints_renderer',
153 '../components/components.gyp:metrics',
154 '../components/components.gyp:metrics_gpu',
155 '../components/components.gyp:metrics_net',
156 '../components/components.gyp:metrics_profiler',
157 '../content/content.gyp:content',
158 '../content/content.gyp:content_app_browser',
159 '../skia/skia.gyp:skia',
160 '../third_party/WebKit/public/blink.gyp:blink',
161 '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
164 'app/cast_main_delegate.cc',
165 'app/cast_main_delegate.h',
166 'browser/cast_browser_context.cc',
167 'browser/cast_browser_context.h',
168 'browser/cast_browser_main_parts.cc',
169 'browser/cast_browser_main_parts.h',
170 'browser/cast_browser_process.cc',
171 'browser/cast_browser_process.h',
172 'browser/cast_content_browser_client.cc',
173 'browser/cast_content_browser_client.h',
174 'browser/cast_content_window.cc',
175 'browser/cast_content_window.h',
176 'browser/cast_download_manager_delegate.cc',
177 'browser/cast_download_manager_delegate.h',
178 'browser/cast_http_user_agent_settings.cc',
179 'browser/cast_http_user_agent_settings.h',
180 'browser/cast_network_delegate.cc',
181 'browser/cast_network_delegate.h',
182 'browser/devtools/cast_dev_tools_delegate.cc',
183 'browser/devtools/cast_dev_tools_delegate.h',
184 'browser/devtools/remote_debugging_server.cc',
185 'browser/devtools/remote_debugging_server.h',
186 'browser/geolocation/cast_access_token_store.cc',
187 'browser/geolocation/cast_access_token_store.h',
188 'browser/metrics/cast_metrics_prefs.cc',
189 'browser/metrics/cast_metrics_prefs.h',
190 'browser/metrics/cast_metrics_service_client.cc',
191 'browser/metrics/cast_metrics_service_client.h',
192 'browser/metrics/cast_stability_metrics_provider.cc',
193 'browser/metrics/cast_stability_metrics_provider.h',
194 'browser/metrics/platform_metrics_providers.h',
195 'browser/pref_service_helper.cc',
196 'browser/pref_service_helper.h',
197 'browser/service/cast_service.cc',
198 'browser/service/cast_service.h',
199 'browser/url_request_context_factory.cc',
200 'browser/url_request_context_factory.h',
201 'common/cast_content_client.cc',
202 'common/cast_content_client.h',
203 'common/cast_paths.cc',
204 'common/cast_paths.h',
205 'common/cast_resource_delegate.cc',
206 'common/cast_resource_delegate.h',
207 'common/chromecast_switches.cc',
208 'common/chromecast_switches.h',
209 'common/platform_client_auth.h',
210 'common/pref_names.cc',
211 'common/pref_names.h',
212 'renderer/cast_content_renderer_client.cc',
213 'renderer/cast_content_renderer_client.h',
214 'renderer/cast_media_load_deferrer.cc',
215 'renderer/cast_media_load_deferrer.h',
216 'renderer/cast_render_process_observer.cc',
217 'renderer/cast_render_process_observer.h',
218 'renderer/key_systems_cast.cc',
219 'renderer/key_systems_cast.h',
222 ['chromecast_branding=="Chrome"', {
224 '<(cast_internal_gyp):cast_shell_internal',
228 'browser/cast_content_browser_client_simple.cc',
229 'browser/cast_network_delegate_simple.cc',
230 'browser/devtools/remote_debugging_server_simple.cc',
231 'browser/media/cast_browser_cdm_factory_simple.cc',
232 'browser/metrics/platform_metrics_providers_simple.cc',
233 'browser/pref_service_helper_simple.cc',
234 'common/platform_client_auth_simple.cc',
235 'renderer/key_systems_cast_simple.cc',
240 'browser/service/cast_service_android.cc',
241 'browser/service/cast_service_android.h',
245 'browser/service/cast_service_simple.cc',
246 'browser/service/cast_service_simple.h',
251 # ExternalMetrics not necessary on Android and (as of this writing) uses
252 # non-portable filesystem operations. Also webcrypto is not used on
256 'browser/metrics/external_metrics.cc',
257 'browser/metrics/external_metrics.h',
260 '../components/components.gyp:metrics_serialization',
266 'target_name': 'cast_version_header',
268 'direct_dependent_settings': {
270 '<(SHARED_INTERMEDIATE_DIR)',
275 'action_name': 'version_header',
276 'message': 'Generating version header file: <@(_outputs)',
279 'common/version.h.in',
282 '<(SHARED_INTERMEDIATE_DIR)/chromecast/common/version.h',
286 '<(version_py_path)',
287 '-e', 'VERSION_FULL="<(version_full)"',
288 # CAST_BUILD_INCREMENTAL is taken from buildbot if available;
289 # otherwise, a dev string is used.
290 '-e', 'CAST_BUILD_INCREMENTAL="<!(echo ${CAST_BUILD_INCREMENTAL:="<!(date +%Y%m%d.%H%M%S)"})"',
291 # CAST_BUILD_RELEASE is taken from cast_build_release file if exist;
292 # otherwise, a dev string is used.
293 '-e', 'CAST_BUILD_RELEASE="<!(if test -f <(cast_build_release); then cat <(cast_build_release); else echo eng.${USER}; fi)"',
294 '-e', 'CAST_IS_DEBUG_BUILD=1 if "<(CONFIGURATION_NAME)" == "Debug" else 0',
295 'common/version.h.in',
299 '../build/util/version.gypi',
306 # Targets for Android receiver.
311 'target_name': 'cast_shell_icudata',
314 '../third_party/icu/icu.gyp:icudata',
317 'destination': '<(PRODUCT_DIR)/assets',
318 'files': ['<(PRODUCT_DIR)/icudtl.dat'],
322 'target_name': 'libcast_shell_android',
323 'type': 'shared_library',
327 'cast_shell_icudata',
329 'cast_version_header',
330 '../base/base.gyp:base',
331 '../breakpad/breakpad.gyp:breakpad_client',
332 '../components/components.gyp:breakpad_host',
333 '../components/components.gyp:crash_component',
334 '../content/content.gyp:content_app_browser',
335 '../content/content.gyp:content',
336 '../skia/skia.gyp:skia',
337 '../ui/gfx/gfx.gyp:gfx',
338 '../ui/gl/gl.gyp:gl',
344 'android/cast_jni_registrar.cc',
345 'android/cast_jni_registrar.h',
346 'android/chromecast_config_android.cc',
347 'android/chromecast_config_android.h',
348 'android/platform_jni_loader.h',
349 'app/android/cast_jni_loader.cc',
350 'browser/android/cast_window_android.cc',
351 'browser/android/cast_window_android.h',
352 'browser/android/cast_window_manager.cc',
353 'browser/android/cast_window_manager.h',
354 'browser/android/external_video_surface_container_impl.cc',
355 'browser/android/external_video_surface_container_impl.h',
356 'crash/android/cast_crash_reporter_client_android.cc',
357 'crash/android/cast_crash_reporter_client_android.h',
358 'crash/android/crash_handler.cc',
359 'crash/android/crash_handler.h',
362 ['chromecast_branding=="Chrome"', {
364 '<(cast_internal_gyp):cast_shell_android_internal'
368 'android/chromecast_config_android_stub.cc',
369 'android/platform_jni_loader_stub.cc',
373 }, # end of target 'libcast_shell_android'
375 'target_name': 'cast_shell_java',
378 '<(android_support_v13_target)',
379 '../base/base.gyp:base_java',
380 '../content/content.gyp:content_java',
381 '../media/media.gyp:media_java',
382 '../net/net.gyp:net_java',
383 '../ui/android/ui_android.gyp:ui_java',
386 'has_java_resources': 1,
387 'java_in_dir': 'browser/android/apk',
388 'resource_dir': 'browser/android/apk/res',
389 'R_package': 'org.chromium.chromecast.shell',
391 'includes': ['../build/java.gypi'],
392 }, # end of target 'cast_shell_java'
394 'target_name': 'cast_shell_manifest',
397 'jinja_inputs': ['browser/android/apk/AndroidManifest.xml.jinja2'],
398 'jinja_output': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
400 'includes': [ '../build/android/jinja_template.gypi' ],
403 'target_name': 'cast_shell_apk',
407 'libcast_shell_android',
410 'apk_name': 'CastShell',
411 'manifest_package_name': 'org.chromium.chromecast.shell',
412 # Note(gunsch): there are no Java files in the android/ directory.
413 # Unfortunately, the java_apk.gypi target rigidly insists on having
414 # a java_in_dir directory, but complains about duplicate classes
415 # from the common cast_shell_java target (shared with internal APK)
416 # if the actual Java path is used.
417 # This will hopefully be removable after the great GN migration.
418 'java_in_dir': 'android',
419 'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
420 'package_name': 'org.chromium.chromecast.shell',
421 'native_lib_target': 'libcast_shell_android',
422 'asset_location': '<(PRODUCT_DIR)/assets',
423 'additional_input_paths': ['<(PRODUCT_DIR)/assets/cast_shell.pak'],
425 'includes': [ '../build/java_apk.gypi' ],
428 'target_name': 'cast_jni_headers',
431 'browser/android/apk/src/org/chromium/chromecast/shell/CastCrashHandler.java',
432 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java',
433 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowManager.java',
434 'browser/android/apk/src/org/chromium/chromecast/shell/ExternalVideoSurfaceContainer.java',
436 'direct_dependent_settings': {
438 '<(SHARED_INTERMEDIATE_DIR)/chromecast',
442 'jni_gen_package': 'chromecast',
444 'includes': [ '../build/jni_generator.gypi' ],
447 }, { # OS != "android"
450 'target_name': 'cast_shell_media',
451 'type': '<(component)',
453 'media/media.gyp:cast_media',
454 '../content/content.gyp:content',
455 '../ipc/ipc.gyp:ipc',
456 '../media/media.gyp:media',
459 'browser/media/cast_browser_cdm_factory.cc',
460 'browser/media/cast_browser_cdm_factory.h',
461 'browser/media/cma_message_filter_host.cc',
462 'browser/media/cma_message_filter_host.h',
463 'browser/media/cma_message_loop.cc',
464 'browser/media/cma_message_loop.h',
465 'browser/media/media_pipeline_host.cc',
466 'browser/media/media_pipeline_host.h',
467 'common/media/cma_ipc_common.h',
468 'common/media/cma_messages.h',
469 'common/media/cma_message_generator.cc',
470 'common/media/cma_message_generator.h',
471 'common/media/cma_param_traits.cc',
472 'common/media/cma_param_traits.h',
473 'common/media/shared_memory_chunk.cc',
474 'common/media/shared_memory_chunk.h',
475 'renderer/media/audio_pipeline_proxy.cc',
476 'renderer/media/audio_pipeline_proxy.h',
477 'renderer/media/cma_media_renderer_factory.cc',
478 'renderer/media/cma_media_renderer_factory.h',
479 'renderer/media/cma_message_filter_proxy.cc',
480 'renderer/media/cma_message_filter_proxy.h',
481 'renderer/media/media_channel_proxy.cc',
482 'renderer/media/media_channel_proxy.h',
483 'renderer/media/media_pipeline_proxy.cc',
484 'renderer/media/media_pipeline_proxy.h',
485 'renderer/media/video_pipeline_proxy.cc',
486 'renderer/media/video_pipeline_proxy.h',
488 }, # end of target 'cast_shell_media'
489 # This target contains all of the primary code of |cast_shell|, except
490 # for |main|. This allows end-to-end tests using |cast_shell|.
491 # This also includes all targets that cannot be built on Android.
493 'target_name': 'cast_shell_core',
494 'type': '<(component)',
499 'media/media.gyp:cast_media',
500 '../ui/aura/aura.gyp:aura_test_support',
503 ['chromecast_branding=="Chrome"', {
505 '<(cast_internal_gyp):cast_gfx_internal',
509 '../ui/ozone/ozone.gyp:eglplatform_shim_x11',
515 'target_name': 'cast_shell',
516 'type': 'executable',
523 # TODO(dougsteed): remove when Chromecast moves to boringssl.
524 # Allow the cast shell to find the NSS module in the same directory.
526 '-Wl,-rpath=\$$ORIGIN'
531 ], # end of conditions