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_pak',
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/cast_content_renderer_client_simple.cc',
236 'renderer/key_systems_cast_simple.cc',
241 'browser/service/cast_service_android.cc',
242 'browser/service/cast_service_android.h',
246 'browser/service/cast_service_simple.cc',
247 'browser/service/cast_service_simple.h',
252 # ExternalMetrics not necessary on Android and (as of this writing) uses
253 # non-portable filesystem operations. Also webcrypto is not used on
257 'browser/metrics/external_metrics.cc',
258 'browser/metrics/external_metrics.h',
261 '../components/components.gyp:metrics_serialization',
267 'target_name': 'cast_version_header',
269 'direct_dependent_settings': {
271 '<(SHARED_INTERMEDIATE_DIR)',
276 'action_name': 'version_header',
277 'message': 'Generating version header file: <@(_outputs)',
280 'common/version.h.in',
283 '<(SHARED_INTERMEDIATE_DIR)/chromecast/common/version.h',
287 '<(version_py_path)',
288 '-e', 'VERSION_FULL="<(version_full)"',
289 # CAST_BUILD_INCREMENTAL is taken from buildbot if available;
290 # otherwise, a dev string is used.
291 '-e', 'CAST_BUILD_INCREMENTAL="<!(echo ${CAST_BUILD_INCREMENTAL:="<!(date +%Y%m%d.%H%M%S)"})"',
292 # CAST_BUILD_RELEASE is taken from cast_build_release file if exist;
293 # otherwise, a dev string is used.
294 '-e', 'CAST_BUILD_RELEASE="<!(if test -f <(cast_build_release); then cat <(cast_build_release); else echo eng.${USER}; fi)"',
295 '-e', 'CAST_IS_DEBUG_BUILD=1 if "<(CONFIGURATION_NAME)" == "Debug" else 0',
296 'common/version.h.in',
300 '../build/util/version.gypi',
307 # Targets for Android receiver.
312 'target_name': 'cast_shell_icudata',
315 '../third_party/icu/icu.gyp:icudata',
318 'destination': '<(PRODUCT_DIR)/assets',
319 'files': ['<(PRODUCT_DIR)/icudtl.dat'],
323 'target_name': 'libcast_shell_android',
324 'type': 'shared_library',
328 'cast_shell_icudata',
330 'cast_version_header',
331 '../base/base.gyp:base',
332 '../breakpad/breakpad.gyp:breakpad_client',
333 '../components/components.gyp:breakpad_host',
334 '../components/components.gyp:crash_component',
335 '../content/content.gyp:content_app_browser',
336 '../content/content.gyp:content',
337 '../skia/skia.gyp:skia',
338 '../ui/gfx/gfx.gyp:gfx',
339 '../ui/gl/gl.gyp:gl',
345 'android/cast_jni_registrar.cc',
346 'android/cast_jni_registrar.h',
347 'android/chromecast_config_android.cc',
348 'android/chromecast_config_android.h',
349 'android/platform_jni_loader.h',
350 'app/android/cast_jni_loader.cc',
351 'browser/android/cast_window_android.cc',
352 'browser/android/cast_window_android.h',
353 'browser/android/cast_window_manager.cc',
354 'browser/android/cast_window_manager.h',
355 'browser/android/external_video_surface_container_impl.cc',
356 'browser/android/external_video_surface_container_impl.h',
357 'crash/android/cast_crash_reporter_client_android.cc',
358 'crash/android/cast_crash_reporter_client_android.h',
359 'crash/android/crash_handler.cc',
360 'crash/android/crash_handler.h',
363 ['chromecast_branding=="Chrome"', {
365 '<(cast_internal_gyp):cast_shell_android_internal'
369 'android/chromecast_config_android_stub.cc',
370 'android/platform_jni_loader_stub.cc',
374 }, # end of target 'libcast_shell_android'
376 'target_name': 'cast_shell_java',
379 '<(android_support_v13_target)',
380 '../base/base.gyp:base_java',
381 '../content/content.gyp:content_java',
382 '../media/media.gyp:media_java',
383 '../net/net.gyp:net_java',
384 '../ui/android/ui_android.gyp:ui_java',
387 'has_java_resources': 1,
388 'java_in_dir': 'browser/android/apk',
389 'resource_dir': 'browser/android/apk/res',
390 'R_package': 'org.chromium.chromecast.shell',
392 'includes': ['../build/java.gypi'],
393 }, # end of target 'cast_shell_java'
395 'target_name': 'cast_shell_manifest',
398 'jinja_inputs': ['browser/android/apk/AndroidManifest.xml.jinja2'],
399 'jinja_output': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
401 'includes': [ '../build/android/jinja_template.gypi' ],
404 'target_name': 'cast_shell_apk',
408 'libcast_shell_android',
411 'apk_name': 'CastShell',
412 'manifest_package_name': 'org.chromium.chromecast.shell',
413 # Note(gunsch): there are no Java files in the android/ directory.
414 # Unfortunately, the java_apk.gypi target rigidly insists on having
415 # a java_in_dir directory, but complains about duplicate classes
416 # from the common cast_shell_java target (shared with internal APK)
417 # if the actual Java path is used.
418 # This will hopefully be removable after the great GN migration.
419 'java_in_dir': 'android',
420 'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
421 'package_name': 'org.chromium.chromecast.shell',
422 'native_lib_target': 'libcast_shell_android',
423 'asset_location': '<(PRODUCT_DIR)/assets',
424 'additional_input_paths': ['<(PRODUCT_DIR)/assets/cast_shell.pak'],
426 'includes': [ '../build/java_apk.gypi' ],
429 'target_name': 'cast_jni_headers',
432 'browser/android/apk/src/org/chromium/chromecast/shell/CastCrashHandler.java',
433 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java',
434 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowManager.java',
435 'browser/android/apk/src/org/chromium/chromecast/shell/ExternalVideoSurfaceContainer.java',
437 'direct_dependent_settings': {
439 '<(SHARED_INTERMEDIATE_DIR)/chromecast',
443 'jni_gen_package': 'chromecast',
445 'includes': [ '../build/jni_generator.gypi' ],
448 }, { # OS != "android"
451 'target_name': 'cast_shell_media',
452 'type': '<(component)',
454 'media/media.gyp:cast_media',
455 '../content/content.gyp:content',
456 '../ipc/ipc.gyp:ipc',
457 '../media/media.gyp:media',
460 'browser/media/cast_browser_cdm_factory.cc',
461 'browser/media/cast_browser_cdm_factory.h',
462 'browser/media/cma_message_filter_host.cc',
463 'browser/media/cma_message_filter_host.h',
464 'browser/media/cma_message_loop.cc',
465 'browser/media/cma_message_loop.h',
466 'browser/media/media_pipeline_host.cc',
467 'browser/media/media_pipeline_host.h',
468 'common/media/cma_ipc_common.h',
469 'common/media/cma_messages.h',
470 'common/media/cma_message_generator.cc',
471 'common/media/cma_message_generator.h',
472 'common/media/cma_param_traits.cc',
473 'common/media/cma_param_traits.h',
474 'common/media/shared_memory_chunk.cc',
475 'common/media/shared_memory_chunk.h',
476 'renderer/media/audio_pipeline_proxy.cc',
477 'renderer/media/audio_pipeline_proxy.h',
478 'renderer/media/cma_media_renderer_factory.cc',
479 'renderer/media/cma_media_renderer_factory.h',
480 'renderer/media/cma_message_filter_proxy.cc',
481 'renderer/media/cma_message_filter_proxy.h',
482 'renderer/media/media_channel_proxy.cc',
483 'renderer/media/media_channel_proxy.h',
484 'renderer/media/media_pipeline_proxy.cc',
485 'renderer/media/media_pipeline_proxy.h',
486 'renderer/media/video_pipeline_proxy.cc',
487 'renderer/media/video_pipeline_proxy.h',
489 }, # end of target 'cast_shell_media'
490 # This target contains all of the primary code of |cast_shell|, except
491 # for |main|. This allows end-to-end tests using |cast_shell|.
492 # This also includes all targets that cannot be built on Android.
494 'target_name': 'cast_shell_core',
495 'type': '<(component)',
500 'media/media.gyp:cast_media',
501 '../ui/aura/aura.gyp:aura_test_support',
504 ['chromecast_branding=="Chrome"', {
506 '<(cast_internal_gyp):cast_gfx_internal',
510 '../ui/ozone/ozone.gyp:eglplatform_shim_x11',
516 'target_name': 'cast_shell',
517 'type': 'executable',
524 # TODO(dougsteed): remove when Chromecast moves to boringssl.
525 # Allow the cast shell to find the NSS module in the same directory.
527 '-Wl,-rpath=\$$ORIGIN'
532 ], # end of conditions