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',
58 'metrics/cast_metrics_prefs.cc',
59 'metrics/cast_metrics_prefs.h',
60 'metrics/cast_metrics_service_client.cc',
61 'metrics/cast_metrics_service_client.h',
62 'metrics/platform_metrics_providers.h',
65 ['chromecast_branding=="Chrome"', {
67 '<(cast_internal_gyp):cast_metrics_internal',
71 'metrics/platform_metrics_providers_simple.cc',
77 'target_name': 'cast_metrics_unittests',
78 'type': '<(gtest_target_type)',
81 '../base/base.gyp:base_prefs_test_support',
82 '../base/base.gyp:run_all_unittests',
83 '../base/base.gyp:test_support_base',
84 '../components/components.gyp:component_metrics_proto',
85 '../testing/gtest.gyp:gtest',
88 'metrics/cast_metrics_service_client_unittest.cc',
90 }, # end of target 'cast_metrics_unittests'
92 'target_name': 'cast_net',
93 'type': '<(component)',
95 'net/network_change_notifier_cast.cc',
96 'net/network_change_notifier_cast.h',
97 'net/network_change_notifier_factory_cast.cc',
98 'net/network_change_notifier_factory_cast.h',
102 'target_name': 'cast_service',
103 'type': '<(component)',
105 '../skia/skia.gyp:skia',
108 'service/cast_service.cc',
109 'service/cast_service.h',
112 ['chromecast_branding=="Chrome"', {
114 'internal/chromecast_internal.gyp:cast_service_internal',
118 '../base/base.gyp:base',
119 '../content/content.gyp:content',
124 'service/cast_service_android.cc',
125 'service/cast_service_android.h',
129 'service/cast_service_simple.cc',
130 'service/cast_service_simple.h',
138 'target_name': 'cast_shell_resources',
141 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chromecast',
145 'action_name': 'cast_shell_resources',
147 'grit_grd_file': 'shell/browser/resources/shell_resources.grd',
148 'grit_resource_ids': 'shell/browser/resources/resource_ids',
150 'includes': [ '../build/grit_action.gypi' ],
153 'includes': [ '../build/grit_target.gypi' ],
156 'target_name': 'cast_shell_pak',
159 'cast_shell_resources',
160 '../content/app/resources/content_resources.gyp:content_resources',
161 '../content/app/strings/content_strings.gyp:content_strings',
162 '../content/browser/devtools/devtools_resources.gyp:devtools_resources',
163 '../net/net.gyp:net_resources',
164 '../third_party/WebKit/public/blink_resources.gyp:blink_resources',
165 '../ui/resources/ui_resources.gyp:ui_resources',
166 '../ui/strings/ui_strings.gyp:ui_strings',
170 'action_name': 'repack_cast_shell_pack',
173 '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_resources.pak',
174 '<(SHARED_INTERMEDIATE_DIR)/chromecast/shell_resources.pak',
175 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
176 '<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_100_percent.pak',
177 '<(SHARED_INTERMEDIATE_DIR)/content/app/strings/content_strings_en-US.pak',
178 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
179 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percent.pak',
180 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/webui_resources.pak',
181 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/app_locale_settings_en-US.pak',
182 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/ui_strings_en-US.pak',
183 '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak',
185 'pak_output': '<(PRODUCT_DIR)/assets/cast_shell.pak',
187 'includes': [ '../build/repack_action.gypi' ],
191 # This target contains all content-embedder implementation that is
192 # non-platform-specific.
194 'target_name': 'cast_shell_common',
195 'type': '<(component)',
201 'cast_shell_resources',
202 'cast_version_header',
203 'chromecast_locales.gyp:chromecast_locales_pak',
204 'chromecast_locales.gyp:chromecast_settings',
205 'media/media.gyp:media_base',
206 '../components/components.gyp:cdm_renderer',
207 '../components/components.gyp:component_metrics_proto',
208 '../content/content.gyp:content',
209 '../content/content.gyp:content_app_browser',
210 '../skia/skia.gyp:skia',
211 '../third_party/WebKit/public/blink.gyp:blink',
212 '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
215 'shell/app/cast_main_delegate.cc',
216 'shell/app/cast_main_delegate.h',
217 'shell/browser/cast_browser_context.cc',
218 'shell/browser/cast_browser_context.h',
219 'shell/browser/cast_browser_main_parts.cc',
220 'shell/browser/cast_browser_main_parts.h',
221 'shell/browser/cast_browser_process.cc',
222 'shell/browser/cast_browser_process.h',
223 'shell/browser/cast_content_browser_client.cc',
224 'shell/browser/cast_content_browser_client.h',
225 'shell/browser/cast_download_manager_delegate.cc',
226 'shell/browser/cast_download_manager_delegate.h',
227 'shell/browser/cast_http_user_agent_settings.cc',
228 'shell/browser/cast_http_user_agent_settings.h',
229 'shell/browser/cast_network_delegate.cc',
230 'shell/browser/cast_network_delegate.h',
231 'shell/browser/devtools/cast_dev_tools_delegate.cc',
232 'shell/browser/devtools/cast_dev_tools_delegate.h',
233 'shell/browser/devtools/remote_debugging_server.cc',
234 'shell/browser/devtools/remote_debugging_server.h',
235 'shell/browser/geolocation/cast_access_token_store.cc',
236 'shell/browser/geolocation/cast_access_token_store.h',
237 'shell/browser/url_request_context_factory.cc',
238 'shell/browser/url_request_context_factory.h',
239 'shell/browser/webui/webui_cast.h',
240 'shell/common/cast_content_client.cc',
241 'shell/common/cast_content_client.h',
242 'shell/renderer/cast_content_renderer_client.cc',
243 'shell/renderer/cast_content_renderer_client.h',
244 'shell/renderer/key_systems_cast.cc',
245 'shell/renderer/key_systems_cast.h',
248 ['chromecast_branding=="Chrome"', {
250 'internal/chromecast_internal.gyp:cast_shell_internal',
254 'shell/browser/cast_network_delegate_simple.cc',
255 'shell/browser/devtools/remote_debugging_server_simple.cc',
256 'shell/browser/webui/webui_cast_simple.cc',
257 'shell/renderer/key_systems_cast_simple.cc',
263 'target_name': 'cast_version_header',
265 'direct_dependent_settings': {
267 '<(SHARED_INTERMEDIATE_DIR)',
272 'action_name': 'version_header',
273 'message': 'Generating version header file: <@(_outputs)',
276 'common/version.h.in',
279 '<(SHARED_INTERMEDIATE_DIR)/chromecast/common/version.h',
283 '<(version_py_path)',
284 '-e', 'VERSION_FULL="<(version_full)"',
285 # Revision is taken from buildbot if available; otherwise, a dev string is used.
286 '-e', 'CAST_BUILD_REVISION="<!(echo ${BUILD_NUMBER:="local.${USER}"})"',
287 '-e', 'CAST_IS_DEBUG_BUILD=1 if "<(CONFIGURATION_NAME)" == "Debug" else 0',
288 'common/version.h.in',
292 '../build/util/version.gypi',
298 'target_name': 'cast_tests',
301 'media/media.gyp:cast_media_unittests',
306 # Targets for Android receiver.
311 'target_name': 'libcast_shell_android',
312 'type': 'shared_library',
318 'cast_version_header',
319 '../base/base.gyp:base',
320 '../content/content.gyp:content_app_browser',
321 '../content/content.gyp:content',
322 '../skia/skia.gyp:skia',
323 '../ui/gfx/gfx.gyp:gfx',
324 '../ui/gl/gl.gyp:gl',
327 'android/cast_jni_registrar.cc',
328 'android/cast_jni_registrar.h',
329 'android/chromecast_config_android.cc',
330 'android/chromecast_config_android.h',
331 'android/platform_jni_loader.h',
332 'shell/app/android/cast_jni_loader.cc',
333 'shell/browser/android/cast_window_manager.cc',
334 'shell/browser/android/cast_window_manager.h',
335 'shell/browser/android/cast_window_android.cc',
336 'shell/browser/android/cast_window_android.h',
339 ['chromecast_branding=="Chrome"', {
341 '<(cast_internal_gyp):cast_shell_android_internal'
345 'android/platform_jni_loader_stub.cc',
349 }, # end of target 'libcast_shell_android'
351 'target_name': 'cast_shell_java',
354 '../base/base.gyp:base_java',
355 '../content/content.gyp:content_java',
356 '../media/media.gyp:media_java',
357 '../net/net.gyp:net_java',
358 '../third_party/android_tools/android_tools.gyp:android_support_v13_javalib',
359 '../ui/android/ui_android.gyp:ui_java',
362 'has_java_resources': 1,
363 'java_in_dir': 'shell/android/apk',
364 'resource_dir': 'shell/android/apk/res',
365 'R_package': 'org.chromium.chromecast.shell',
367 'includes': ['../build/java.gypi'],
368 }, # end of target 'cast_shell_java'
370 'target_name': 'cast_shell_apk',
374 'libcast_shell_android',
377 'apk_name': 'CastShell',
378 'manifest_package_name': 'org.chromium.chromecast.shell',
379 # Note(gunsch): there are no Java files in the android/ directory.
380 # Unfortunately, the java_apk.gypi target rigidly insists on having
381 # a java_in_dir directory, but complains about duplicate classes
382 # from the common cast_shell_java target (shared with internal APK)
383 # if the actual Java path is used.
384 # This will hopefully be removable after the great GN migration.
385 'java_in_dir': 'android',
386 'android_manifest_path': 'shell/android/apk/AndroidManifest.xml',
387 'package_name': 'org.chromium.chromecast.shell',
388 'native_lib_target': 'libcast_shell_android',
389 'asset_location': '<(PRODUCT_DIR)/assets',
390 'additional_input_paths': ['<(PRODUCT_DIR)/assets/cast_shell.pak'],
392 'includes': [ '../build/java_apk.gypi' ],
395 'target_name': 'cast_jni_headers',
398 'shell/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java',
399 'shell/android/apk/src/org/chromium/chromecast/shell/CastWindowManager.java',
401 'direct_dependent_settings': {
403 '<(SHARED_INTERMEDIATE_DIR)/chromecast',
407 'jni_gen_package': 'chromecast',
409 'includes': [ '../build/jni_generator.gypi' ],
412 }, { # OS != "android"
414 # This target contains all of the primary code of |cast_shell|, except
415 # for |main|. This allows end-to-end tests using |cast_shell|.
416 # This also includes all targets that cannot be built on Android.
418 'target_name': 'cast_shell_core',
419 'type': '<(component)',
423 'media/media.gyp:cast_media',
424 '../ui/aura/aura.gyp:aura_test_support',
427 ['chromecast_branding=="Chrome"', {
429 'internal/chromecast_internal.gyp:cast_gfx_internal',
433 '../ui/ozone/ozone.gyp:eglplatform_shim_x11',
439 'target_name': 'cast_shell',
440 'type': 'executable',
445 'shell/app/cast_main.cc',
449 'target_name': 'cast_shell_browser_test',
450 'type': '<(gtest_target_type)',
452 'cast_shell_test_support',
453 '../testing/gtest.gyp:gtest',
456 'HAS_OUT_OF_PROC_TEST_RUNNER',
459 'shell/browser/test/chromecast_shell_browser_test.cc',
463 'target_name': 'cast_shell_test_support',
464 'type': '<(component)',
466 'HAS_OUT_OF_PROC_TEST_RUNNER',
470 '../content/content_shell_and_tests.gyp:content_browser_test_support',
471 '../testing/gtest.gyp:gtest',
474 'shell/browser/test/chromecast_browser_test.cc',
475 'shell/browser/test/chromecast_browser_test.h',
476 'shell/browser/test/chromecast_browser_test_runner.cc',
481 ], # end of conditions