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.
8 'chromecast_branding%': 'Chromium',
12 '..', # Root of Chromium checkout
17 'target_name': 'cast_common',
18 'type': '<(component)',
20 '../base/base.gyp:base',
23 'common/cast_paths.cc',
24 'common/cast_paths.h',
25 'common/cast_resource_delegate.cc',
26 'common/cast_resource_delegate.h',
27 'common/chromecast_config.cc',
28 'common/chromecast_config.h',
29 'common/chromecast_switches.cc',
30 'common/chromecast_switches.h',
31 'common/pref_names.cc',
32 'common/pref_names.h',
35 ['chromecast_branding=="Chrome"', {
37 'internal/chromecast_internal.gyp:cast_common_internal',
41 'common/chromecast_config_simple.cc',
47 'target_name': 'cast_metrics',
48 'type': '<(component)',
51 '../components/components.gyp:component_metrics_proto',
52 '../components/components.gyp:metrics',
53 '../components/components.gyp:metrics_gpu',
54 '../components/components.gyp:metrics_net',
55 '../components/components.gyp:metrics_profiler',
56 '../content/content.gyp:content',
59 'metrics/cast_metrics_prefs.cc',
60 'metrics/cast_metrics_prefs.h',
61 'metrics/cast_metrics_service_client.cc',
62 'metrics/cast_metrics_service_client.h',
63 'metrics/cast_stability_metrics_provider.cc',
64 'metrics/cast_stability_metrics_provider.h',
65 'metrics/platform_metrics_providers.h',
68 ['chromecast_branding=="Chrome"', {
70 '<(cast_internal_gyp):cast_metrics_internal',
74 'metrics/platform_metrics_providers_simple.cc',
80 'target_name': 'cast_metrics_unittests',
81 'type': '<(gtest_target_type)',
84 '../base/base.gyp:base_prefs_test_support',
85 '../base/base.gyp:run_all_unittests',
86 '../base/base.gyp:test_support_base',
87 '../components/components.gyp:component_metrics_proto',
88 '../testing/gtest.gyp:gtest',
91 'metrics/cast_metrics_service_client_unittest.cc',
94 ['use_allocator!="none"', {
96 '../base/allocator/allocator.gyp:allocator',
100 }, # end of target 'cast_metrics_unittests'
102 'target_name': 'cast_net',
103 'type': '<(component)',
105 'net/network_change_notifier_cast.cc',
106 'net/network_change_notifier_cast.h',
107 'net/network_change_notifier_factory_cast.cc',
108 'net/network_change_notifier_factory_cast.h',
112 'target_name': 'cast_service',
113 'type': '<(component)',
115 '../skia/skia.gyp:skia',
118 'service/cast_service.cc',
119 'service/cast_service.h',
122 ['chromecast_branding=="Chrome"', {
124 'internal/chromecast_internal.gyp:cast_service_internal',
128 '../base/base.gyp:base',
129 '../content/content.gyp:content',
134 'service/cast_service_android.cc',
135 'service/cast_service_android.h',
139 'service/cast_service_simple.cc',
140 'service/cast_service_simple.h',
148 'target_name': 'cast_shell_resources',
151 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chromecast',
155 'action_name': 'cast_shell_resources',
157 'grit_grd_file': 'shell/browser/resources/shell_resources.grd',
158 'grit_resource_ids': 'shell/browser/resources/resource_ids',
160 'includes': [ '../build/grit_action.gypi' ],
163 'includes': [ '../build/grit_target.gypi' ],
166 'target_name': 'cast_shell_pak',
169 'cast_shell_resources',
170 '../content/app/resources/content_resources.gyp:content_resources',
171 '../content/app/strings/content_strings.gyp:content_strings',
172 '../content/browser/devtools/devtools_resources.gyp:devtools_resources',
173 '../net/net.gyp:net_resources',
174 '../third_party/WebKit/public/blink_resources.gyp:blink_resources',
175 '../ui/resources/ui_resources.gyp:ui_resources',
176 '../ui/strings/ui_strings.gyp:ui_strings',
180 'action_name': 'repack_cast_shell_pack',
183 '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_resources.pak',
184 '<(SHARED_INTERMEDIATE_DIR)/chromecast/shell_resources.pak',
185 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
186 '<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_100_percent.pak',
187 '<(SHARED_INTERMEDIATE_DIR)/content/app/strings/content_strings_en-US.pak',
188 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
189 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percent.pak',
190 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/webui_resources.pak',
191 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/app_locale_settings_en-US.pak',
192 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/ui_strings_en-US.pak',
193 '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak',
195 'pak_output': '<(PRODUCT_DIR)/assets/cast_shell.pak',
197 'includes': [ '../build/repack_action.gypi' ],
201 # This target contains all content-embedder implementation that is
202 # non-platform-specific.
204 'target_name': 'cast_shell_common',
205 'type': '<(component)',
211 'cast_shell_resources',
212 'cast_version_header',
213 'chromecast_locales.gyp:chromecast_locales_pak',
214 'chromecast_locales.gyp:chromecast_settings',
215 'media/media.gyp:media_base',
216 '../components/components.gyp:cdm_renderer',
217 '../components/components.gyp:component_metrics_proto',
218 '../content/content.gyp:content',
219 '../content/content.gyp:content_app_browser',
220 '../skia/skia.gyp:skia',
221 '../third_party/WebKit/public/blink.gyp:blink',
222 '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
225 'shell/app/cast_main_delegate.cc',
226 'shell/app/cast_main_delegate.h',
227 'shell/browser/cast_browser_context.cc',
228 'shell/browser/cast_browser_context.h',
229 'shell/browser/cast_browser_main_parts.cc',
230 'shell/browser/cast_browser_main_parts.h',
231 'shell/browser/cast_browser_process.cc',
232 'shell/browser/cast_browser_process.h',
233 'shell/browser/cast_content_browser_client.cc',
234 'shell/browser/cast_content_browser_client.h',
235 'shell/browser/cast_download_manager_delegate.cc',
236 'shell/browser/cast_download_manager_delegate.h',
237 'shell/browser/cast_http_user_agent_settings.cc',
238 'shell/browser/cast_http_user_agent_settings.h',
239 'shell/browser/cast_network_delegate.cc',
240 'shell/browser/cast_network_delegate.h',
241 'shell/browser/devtools/cast_dev_tools_delegate.cc',
242 'shell/browser/devtools/cast_dev_tools_delegate.h',
243 'shell/browser/devtools/remote_debugging_server.cc',
244 'shell/browser/devtools/remote_debugging_server.h',
245 'shell/browser/geolocation/cast_access_token_store.cc',
246 'shell/browser/geolocation/cast_access_token_store.h',
247 'shell/browser/url_request_context_factory.cc',
248 'shell/browser/url_request_context_factory.h',
249 'shell/browser/webui/webui_cast.h',
250 'shell/common/cast_content_client.cc',
251 'shell/common/cast_content_client.h',
252 'shell/renderer/cast_content_renderer_client.cc',
253 'shell/renderer/cast_content_renderer_client.h',
254 'shell/renderer/key_systems_cast.cc',
255 'shell/renderer/key_systems_cast.h',
258 ['chromecast_branding=="Chrome"', {
260 'internal/chromecast_internal.gyp:cast_shell_internal',
264 'shell/browser/cast_network_delegate_simple.cc',
265 'shell/browser/devtools/remote_debugging_server_simple.cc',
266 'shell/browser/webui/webui_cast_simple.cc',
267 'shell/renderer/key_systems_cast_simple.cc',
273 'target_name': 'cast_version_header',
275 'direct_dependent_settings': {
277 '<(SHARED_INTERMEDIATE_DIR)',
282 'action_name': 'version_header',
283 'message': 'Generating version header file: <@(_outputs)',
286 'common/version.h.in',
289 '<(SHARED_INTERMEDIATE_DIR)/chromecast/common/version.h',
293 '<(version_py_path)',
294 '-e', 'VERSION_FULL="<(version_full)"',
295 # Revision is taken from buildbot if available; otherwise, a dev string is used.
296 '-e', 'CAST_BUILD_REVISION="<!(echo ${BUILD_NUMBER:="local.${USER}"})"',
297 '-e', 'CAST_IS_DEBUG_BUILD=1 if "<(CONFIGURATION_NAME)" == "Debug" else 0',
298 'common/version.h.in',
302 '../build/util/version.gypi',
308 'target_name': 'cast_tests',
311 'media/media.gyp:cast_media_unittests',
316 # Targets for Android receiver.
321 'target_name': 'libcast_shell_android',
322 'type': 'shared_library',
328 'cast_version_header',
329 '../base/base.gyp:base',
330 '../breakpad/breakpad.gyp:breakpad_client',
331 '../components/components.gyp:breakpad_host',
332 '../components/components.gyp:crash_component',
333 '../content/content.gyp:content_app_browser',
334 '../content/content.gyp:content',
335 '../skia/skia.gyp:skia',
336 '../ui/gfx/gfx.gyp:gfx',
337 '../ui/gl/gl.gyp:gl',
343 'android/cast_jni_registrar.cc',
344 'android/cast_jni_registrar.h',
345 'android/chromecast_config_android.cc',
346 'android/chromecast_config_android.h',
347 'android/platform_jni_loader.h',
348 'crash/android/cast_crash_reporter_client_android.cc',
349 'crash/android/cast_crash_reporter_client_android.h',
350 'crash/android/crash_handler.cc',
351 'crash/android/crash_handler.h',
352 'shell/app/android/cast_jni_loader.cc',
353 'shell/browser/android/cast_window_android.cc',
354 'shell/browser/android/cast_window_android.h',
355 'shell/browser/android/cast_window_manager.cc',
356 'shell/browser/android/cast_window_manager.h',
357 'shell/browser/android/external_video_surface_container_impl.cc',
358 'shell/browser/android/external_video_surface_container_impl.h',
361 ['chromecast_branding=="Chrome"', {
363 '<(cast_internal_gyp):cast_shell_android_internal'
367 'android/chromecast_config_android_stub.cc',
368 'android/platform_jni_loader_stub.cc',
372 }, # end of target 'libcast_shell_android'
374 'target_name': 'cast_shell_java',
377 '../base/base.gyp:base_java',
378 '../content/content.gyp:content_java',
379 '../media/media.gyp:media_java',
380 '../net/net.gyp:net_java',
381 '../third_party/android_tools/android_tools.gyp:android_support_v13_javalib',
382 '../ui/android/ui_android.gyp:ui_java',
385 'has_java_resources': 1,
386 'java_in_dir': 'shell/android/apk',
387 'resource_dir': 'shell/android/apk/res',
388 'R_package': 'org.chromium.chromecast.shell',
390 'includes': ['../build/java.gypi'],
391 }, # end of target 'cast_shell_java'
393 'target_name': 'cast_shell_apk',
397 'libcast_shell_android',
400 'apk_name': 'CastShell',
401 'manifest_package_name': 'org.chromium.chromecast.shell',
402 # Note(gunsch): there are no Java files in the android/ directory.
403 # Unfortunately, the java_apk.gypi target rigidly insists on having
404 # a java_in_dir directory, but complains about duplicate classes
405 # from the common cast_shell_java target (shared with internal APK)
406 # if the actual Java path is used.
407 # This will hopefully be removable after the great GN migration.
408 'java_in_dir': 'android',
409 'android_manifest_path': 'shell/android/apk/AndroidManifest.xml',
410 'package_name': 'org.chromium.chromecast.shell',
411 'native_lib_target': 'libcast_shell_android',
412 'asset_location': '<(PRODUCT_DIR)/assets',
413 'additional_input_paths': ['<(PRODUCT_DIR)/assets/cast_shell.pak'],
415 'includes': [ '../build/java_apk.gypi' ],
418 'target_name': 'cast_jni_headers',
421 'shell/android/apk/src/org/chromium/chromecast/shell/CastCrashHandler.java',
422 'shell/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java',
423 'shell/android/apk/src/org/chromium/chromecast/shell/CastWindowManager.java',
424 'shell/android/apk/src/org/chromium/chromecast/shell/ExternalVideoSurfaceContainer.java',
426 'direct_dependent_settings': {
428 '<(SHARED_INTERMEDIATE_DIR)/chromecast',
432 'jni_gen_package': 'chromecast',
434 'includes': [ '../build/jni_generator.gypi' ],
437 }, { # OS != "android"
439 # This target contains all of the primary code of |cast_shell|, except
440 # for |main|. This allows end-to-end tests using |cast_shell|.
441 # This also includes all targets that cannot be built on Android.
443 'target_name': 'cast_shell_core',
444 'type': '<(component)',
448 'media/media.gyp:cast_media',
449 '../ui/aura/aura.gyp:aura_test_support',
452 ['chromecast_branding=="Chrome"', {
454 'internal/chromecast_internal.gyp:cast_gfx_internal',
458 '../ui/ozone/ozone.gyp:eglplatform_shim_x11',
464 'target_name': 'cast_shell',
465 'type': 'executable',
470 'shell/app/cast_main.cc',
474 'target_name': 'cast_shell_browser_test',
475 'type': '<(gtest_target_type)',
477 'cast_shell_test_support',
478 '../testing/gtest.gyp:gtest',
481 'HAS_OUT_OF_PROC_TEST_RUNNER',
484 'shell/browser/test/chromecast_shell_browser_test.cc',
488 'target_name': 'cast_shell_test_support',
489 'type': '<(component)',
491 'HAS_OUT_OF_PROC_TEST_RUNNER',
495 '../content/content_shell_and_tests.gyp:content_browser_test_support',
496 '../testing/gtest.gyp:gtest',
499 'shell/browser/test/chromecast_browser_test.cc',
500 'shell/browser/test/chromecast_browser_test.h',
501 'shell/browser/test/chromecast_browser_test_runner.cc',
506 ], # end of conditions