1 # Copyright (c) 2012 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 # Define the common dependencies that contain all the actual
9 # Chromium functionality. This list gets pulled in below by
10 # the link of the actual chrome (or chromium) executable on
11 # Linux or Mac, and into chrome.dll on Windows.
12 # NOTE: Most new includes should go in the OS!="ios" condition below.
14 # GN version is the group //chrome:browser_dependencies
15 'chromium_browser_dependencies': [
18 '../sync/sync.gyp:sync',
20 # GN version is the group //chrome:child_dependencies
21 'chromium_child_dependencies': [
23 '../sync/sync.gyp:sync',
25 'allocator_target': '../base/allocator/allocator.gyp:allocator',
26 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chrome',
27 'protoc_out_dir': '<(SHARED_INTERMEDIATE_DIR)/protoc_out',
30 'chromium_browser_dependencies': [
32 '../ppapi/ppapi_internal.gyp:ppapi_host',
34 'chromium_child_dependencies': [
38 '../content/content.gyp:content_gpu',
39 '../content/content.gyp:content_ppapi_plugin',
40 '../third_party/WebKit/public/blink_devtools.gyp:blink_devtools_frontend_resources',
43 [ 'cld_version==0 or cld_version==2', {
44 'chromium_child_dependencies': [
45 # Use whatever CLD2 data access mode that the application
47 '<(DEPTH)/third_party/cld_2/cld_2.gyp:cld2_platform_impl', ],
51 ['enable_basic_printing==1 or enable_print_preview==1', {
52 'chromium_browser_dependencies': [
53 '../printing/printing.gyp:printing',
56 ['enable_print_preview==1', {
57 'chromium_browser_dependencies': [
62 'platform_locale_settings_grd':
63 'app/resources/locale_settings_win.grd',
69 ['branding=="Chrome"', {
70 'platform_locale_settings_grd':
71 'app/resources/locale_settings_google_chromeos.grd',
72 }, { # branding!=Chrome
73 'platform_locale_settings_grd':
74 'app/resources/locale_settings_chromiumos.grd',
78 'platform_locale_settings_grd':
79 'app/resources/locale_settings_linux.grd',
83 ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "linux"', {
84 'platform_locale_settings_grd':
85 'app/resources/locale_settings_linux.grd',
88 'tweak_info_plist_path': '../build/mac/tweak_info_plist.py',
89 'platform_locale_settings_grd':
90 'app/resources/locale_settings_mac.grd',
95 # Place some targets in gypi files to reduce contention on this file.
96 # By using an include, we keep everything in a single xcodeproj file.
97 # Note on Win64 targets: targets that end with win64 be used
98 # on 64-bit Windows only. Targets that end with nacl_win64 should be used
99 # by Native Client only.
100 # NOTE: Most new includes should go in the OS!="ios" condition below.
101 '../build/chrome_settings.gypi',
102 '../build/util/version.gypi',
103 '../build/win_precompile.gypi',
104 'chrome_browser.gypi',
105 'chrome_browser_ui.gypi',
106 'chrome_common.gypi',
107 'chrome_installer_util.gypi',
108 '../components/nacl/nacl_defines.gypi',
114 'app_installer/app_installer.gypi',
115 'chrome_debugger.gypi',
118 'chrome_installer.gypi',
119 'chrome_plugin.gypi',
120 'chrome_renderer.gypi',
122 'chrome_tests_unit.gypi',
123 'chrome_utility.gypi',
124 'policy_templates.gypi',
128 'target_name': 'default_extensions',
134 'destination': '<(PRODUCT_DIR)/extensions',
136 'browser/extensions/default_extensions/external_extensions.json'
147 'app_shim/app_shim.gypi',
148 'browser/apps/app_shim/browser_app_shim.gypi',
152 'target_name': 'helper_app',
153 'type': 'executable',
154 'variables': { 'enable_wexit_time_destructors': 1, },
155 'product_name': '<(mac_product_name) Helper',
159 'infoplist_strings_tool',
162 # chrome_exe_main_mac.cc's main() is the entry point for
163 # the "chrome" (browser app) target. All it does is jump
164 # to chrome_dll's ChromeMain. This is appropriate for
165 # helper processes too, because the logic to discriminate
166 # between process types at run time is actually directed
167 # by the --type command line argument processed by
168 # ChromeMain. Sharing chrome_exe_main_mac.cc with the
169 # browser app will suffice for now.
170 'app/chrome_exe_main_mac.cc',
171 'app/helper-Info.plist',
173 # TODO(mark): Come up with a fancier way to do this. It should only
174 # be necessary to list helper-Info.plist once, not the three times it
176 'mac_bundle_resources!': [
177 'app/helper-Info.plist',
179 # TODO(mark): For now, don't put any resources into this app. Its
180 # resources directory will be a symbolic link to the browser app's
181 # resources directory.
182 'mac_bundle_resources/': [
186 'CHROMIUM_BUNDLE_ID': '<(mac_bundle_id)',
187 'CHROMIUM_SHORT_NAME': '<(branding)',
188 'CHROMIUM_STRIP_SAVE_FILE': 'app/app.saves',
189 'INFOPLIST_FILE': 'app/helper-Info.plist',
193 # The helper doesn't have real localizations, it just has
194 # empty .lproj directories, which is enough to convince Cocoa
195 # that anything running out of the helper .app supports those
197 'postbuild_name': 'Make Empty Localizations',
200 '>!@(<(apply_locales_cmd) -d ZZLOCALE.lproj <(locales))',
204 'tools/build/mac/make_locale_dirs.sh',
209 # The framework (chrome_dll) defines its load-time path
210 # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
211 # (chrome). A different relative path needs to be used in
213 'postbuild_name': 'Fix Framework Link',
217 '@executable_path/../Versions/<(version_full)/<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
218 '@executable_path/../../../<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
219 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
223 # Modify the Info.plist as needed. The script explains why this
224 # is needed. This is also done in the chrome and chrome_dll
225 # targets. In this case, --breakpad=0, --keystone=0, and --scm=0
226 # are used because Breakpad, Keystone, and SCM keys are
227 # never placed into the helper.
228 'postbuild_name': 'Tweak Info.plist',
229 'action': ['<(tweak_info_plist_path)',
235 # Make sure there isn't any Objective-C in the helper app's
237 'postbuild_name': 'Verify No Objective-C',
239 '../build/mac/verify_no_objc.sh',
244 ['mac_breakpad==1', {
246 # A real .dSYM is needed for dump_syms to operate on.
250 # With mac_real_dsym set, strip_from_xcode won't be used.
251 # Specify CHROMIUM_STRIP_SAVE_FILE directly to Xcode.
252 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
257 # Override the outer definition of CHROMIUM_STRIP_SAVE_FILE.
258 'CHROMIUM_STRIP_SAVE_FILE': 'app/app_asan.saves',
261 ['component=="shared_library"', {
263 'LD_RUNPATH_SEARCH_PATHS': [
264 # Get back from Chromium.app/Contents/Versions/V/
265 # Helper.app/Contents/MacOS
266 '@loader_path/../../../../../../..',
271 }, # target helper_app
273 # A library containing the actual code for the app mode app, shared
275 'target_name': 'app_mode_app_support',
276 'type': 'static_library',
277 'variables': { 'enable_wexit_time_destructors': 1, },
278 'product_name': 'app_mode_app_support',
280 '../base/base.gyp:base',
281 'common_constants.gyp:common_constants',
284 'common/mac/app_mode_chrome_locator.h',
285 'common/mac/app_mode_chrome_locator.mm',
286 'common/mac/app_mode_common.h',
287 'common/mac/app_mode_common.mm',
292 }, # target app_mode_app_support
294 # Convenience target to build a disk image.
295 'target_name': 'build_app_dmg',
296 # Don't place this in the 'all' list; most won't want it.
297 # In GYP, booleans are 0/1, not True/False.
298 'suppress_wildcard': 1,
304 'build_app_dmg_script_path': 'tools/build/mac/build_app_dmg',
305 'pkg_dmg_script_path': 'installer/mac/pkg-dmg',
308 # This duplicates the output path from build_app_dmg.
309 ['branding=="Chrome"', {
310 'dmg_name': 'GoogleChrome.dmg',
311 }, { # else: branding!="Chrome"
312 'dmg_name': 'Chromium.dmg',
319 '<(build_app_dmg_script_path)',
320 '<(pkg_dmg_script_path)',
321 '<(PRODUCT_DIR)/<(mac_product_name).app',
324 '<(PRODUCT_DIR)/<(dmg_name)',
326 'action_name': 'build_app_dmg',
327 'action': ['<(build_app_dmg_script_path)', '<@(branding)'],
332 'target_name': 'infoplist_strings_tool',
333 'type': 'executable',
334 'variables': { 'enable_wexit_time_destructors': 1, },
336 'chrome_resources.gyp:chrome_strings',
337 '../base/base.gyp:base',
338 '../ui/base/ui_base.gyp:ui_base',
339 '../ui/gfx/gfx.gyp:gfx',
340 '../ui/gfx/gfx.gyp:gfx_geometry',
346 'tools/mac_helpers/infoplist_strings_util.mm',
354 'target_name': 'linux_symbols',
357 ['linux_dump_symbols==1', {
360 'action_name': 'dump_symbols',
362 '<(DEPTH)/build/linux/dump_app_syms',
363 '<(PRODUCT_DIR)/dump_syms',
364 '<(PRODUCT_DIR)/chrome',
367 '<(PRODUCT_DIR)/chrome.breakpad.<(target_arch)',
369 'action': ['<(DEPTH)/build/linux/dump_app_syms',
370 '<(PRODUCT_DIR)/dump_syms',
371 '<(linux_strip_binary)',
372 '<(PRODUCT_DIR)/chrome',
374 'message': 'Dumping breakpad symbols to <(_outputs)',
375 'process_outputs_as_sources': 1,
380 '../breakpad/breakpad.gyp:dump_syms',
390 # For historical reasons, chrome/chrome.sln has been the entry point
391 # for new Chrome developers. To assist development, include several
392 # core unittests that are otherwise only accessible side-by-side with
393 # chrome via all/all.sln.
394 'target_name': 'test_targets',
397 '../base/base.gyp:base_unittests',
398 '../content/content_shell_and_tests.gyp:content_browsertests',
399 '../content/content_shell_and_tests.gyp:content_shell',
400 '../content/content_shell_and_tests.gyp:content_unittests',
401 '../net/net.gyp:net_unittests',
402 '../ui/base/ui_base_tests.gyp:ui_base_unittests',
406 'target_name': 'chrome_version_resources',
409 ['branding == "Chrome"', {
411 'branding_path': 'app/theme/google_chrome/BRANDING',
413 }, { # else branding!="Chrome"
415 'branding_path': 'app/theme/chromium/BRANDING',
420 'output_dir': 'chrome_version',
421 'template_input_path': 'app/chrome_version.rc.version',
423 'direct_dependent_settings': {
425 '<(SHARED_INTERMEDIATE_DIR)/<(output_dir)',
429 'app/chrome_exe.ver',
430 'app/chrome_dll.ver',
431 'app/nacl64_exe.ver',
435 'version_resource_rules.gypi',
439 # GN version: //chrome:version_header
440 'target_name': 'chrome_version_header',
442 'hard_dependency': 1,
445 'action_name': 'version_header',
448 '<(DEPTH)/build/util/LASTCHANGE',
451 ['branding == "Chrome"', {
453 'branding_path': 'app/theme/google_chrome/BRANDING',
455 }, { # else branding!="Chrome"
457 'branding_path': 'app/theme/chromium/BRANDING',
464 '<(lastchange_path)',
468 '<(SHARED_INTERMEDIATE_DIR)/version.h',
472 '<(version_py_path)',
473 '-f', '<(version_path)',
474 '-f', '<(branding_path)',
475 '-f', '<(lastchange_path)',
479 'message': 'Generating version header file: <@(_outputs)',
484 'target_name': 'crash_service',
485 'type': 'executable',
488 '../base/base.gyp:base',
489 '../chrome/common_constants.gyp:common_constants',
490 '../components/components.gyp:breakpad_crash_service',
496 'tools/crash_service/main.cc',
500 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
505 'target_name': 'sb_sigutil',
506 'type': 'executable',
508 '../base/base.gyp:base',
509 'safe_browsing_proto',
512 'browser/safe_browsing/binary_feature_extractor.h',
513 'browser/safe_browsing/binary_feature_extractor_win.cc',
514 'browser/safe_browsing/pe_image_reader_win.cc',
515 'browser/safe_browsing/pe_image_reader_win.h',
516 'tools/safe_browsing/sb_sigutil.cc',
521 'app_shim/app_shim_win.gypi',
522 'chrome_watcher/chrome_watcher.gypi',
523 'chrome_process_finder.gypi',
527 ['OS=="win" and target_arch=="ia32"',
530 'target_name': 'chrome_user32_delay_imports',
533 'lib_dir': '<(INTERMEDIATE_DIR)',
536 'chrome.user32.delay.imports'
539 '../build/win/importlibs/create_import_lib.gypi',
541 'direct_dependent_settings': {
544 'AdditionalLibraryDirectories': ['<(lib_dir)', ],
545 'AdditionalDependencies': ['chrome.user32.delay.lib', ],
551 'target_name': 'crash_service_win64',
552 'type': 'executable',
553 'product_name': 'crash_service64',
555 'installer_util_nacl_win64',
556 '../base/base.gyp:base_static_win64',
557 '../chrome/common_constants.gyp:common_constants_win64',
558 '../components/components.gyp:breakpad_crash_service_win64',
564 'tools/crash_service/main.cc',
565 '../content/public/common/content_switches.cc',
568 'COMPILE_CONTENT_STATICALLY',
572 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
577 'msvs_target_platform': 'x64',
582 ], # OS=="win" and target_arch=="ia32"
584 'includes': [ 'chrome_browser_chromeos.gypi' ],
590 # GN: //chrome/android:chrome_java
591 'target_name': 'chrome_java',
594 'activity_type_ids_java',
595 'app_banner_metrics_ids_java',
596 'chrome_resources.gyp:chrome_strings',
597 'chrome_strings_grd',
598 'chrome_version_java',
599 'profile_account_management_metrics_java',
600 'content_setting_java',
601 'content_settings_type_java',
602 'page_info_connection_type_java',
603 'profile_sync_service_model_type_selection_java',
605 'toolbar_model_security_levels_java',
606 'tab_load_status_java',
607 '../base/base.gyp:base',
608 '../components/components.gyp:bookmarks_java',
609 '../components/components.gyp:dom_distiller_core_java',
610 '../components/components.gyp:gcm_driver_java',
611 '../components/components.gyp:invalidation_java',
612 '../components/components.gyp:navigation_interception_java',
613 '../components/components.gyp:variations_java',
614 '../components/components.gyp:web_contents_delegate_android_java',
615 '../content/content.gyp:content_java',
616 '../printing/printing.gyp:printing_java',
617 '../sync/sync.gyp:sync_java',
618 '../third_party/android_tools/android_tools.gyp:android_support_v7_appcompat_javalib',
619 '../third_party/android_tools/android_tools.gyp:android_support_v13_javalib',
620 '../ui/android/ui_android.gyp:ui_java',
623 'java_in_dir': '../chrome/android/java',
624 'has_java_resources': 1,
625 'R_package': 'org.chromium.chrome',
626 'R_package_relpath': 'org/chromium/chrome',
627 # Include xml string files generated from generated_resources.grd
628 'res_extra_dirs': ['<(SHARED_INTERMEDIATE_DIR)/chrome/java/res'],
629 'res_extra_files': ['<!@pymod_do_main(grit_info <@(grit_defines) --outputs "<(SHARED_INTERMEDIATE_DIR)/chrome" app/generated_resources.grd)'],
632 '../build/java.gypi',
636 # GN: //chrome/android:chrome_strings_grd
637 'target_name': 'chrome_strings_grd',
640 'grd_file': '../chrome/android/java/strings/android_chrome_strings.grd',
643 '../build/java_strings_grd.gypi',
647 # GN: //chrome:content_setting_javagen
648 'target_name': 'content_setting_java',
651 'source_file': '../components/content_settings/core/common/content_settings.h',
653 'includes': [ '../build/android/java_cpp_enum.gypi' ],
656 # GN: //chrome:content_settings_type_javagen
657 'target_name': 'content_settings_type_java',
660 'source_file': '../components/content_settings/core/common/content_settings_types.h',
662 'includes': [ '../build/android/java_cpp_enum.gypi' ],
665 # GN: //chrome:page_info_connection_type_javagen
666 'target_name': 'page_info_connection_type_java',
669 'source_file': 'browser/ui/android/website_settings_popup_android.h',
671 'includes': [ '../build/android/java_cpp_enum.gypi' ],
675 'chrome_android.gypi',
678 ['configuration_policy==1 and OS!="android" and OS!="ios"', {
679 'includes': [ 'policy.gypi', ],
681 ['enable_extensions==1', {
683 'chrome_browser_extensions.gypi',
686 ['enable_print_preview==1', {
689 # GN version: //chrome/service
690 'target_name': 'service',
691 'type': 'static_library',
692 'variables': { 'enable_wexit_time_destructors': 1, },
694 'chrome_resources.gyp:chrome_strings',
697 '../base/base.gyp:base',
698 '../components/components.gyp:cloud_devices_common',
699 '../google_apis/google_apis.gyp:google_apis',
700 '../jingle/jingle.gyp:notifier',
701 '../net/net.gyp:net',
702 '../printing/printing.gyp:printing',
703 '../skia/skia.gyp:skia',
704 '../third_party/libjingle/libjingle.gyp:libjingle',
707 # Note: sources list duplicated in GN build.
708 'service/cloud_print/cdd_conversion_win.cc',
709 'service/cloud_print/cdd_conversion_win.h',
710 'service/cloud_print/cloud_print_auth.cc',
711 'service/cloud_print/cloud_print_auth.h',
712 'service/cloud_print/cloud_print_connector.cc',
713 'service/cloud_print/cloud_print_connector.h',
714 'service/cloud_print/cloud_print_proxy.cc',
715 'service/cloud_print/cloud_print_proxy.h',
716 'service/cloud_print/cloud_print_proxy_backend.cc',
717 'service/cloud_print/cloud_print_proxy_backend.h',
718 'service/cloud_print/cloud_print_service_helpers.cc',
719 'service/cloud_print/cloud_print_service_helpers.h',
720 'service/cloud_print/cloud_print_token_store.cc',
721 'service/cloud_print/cloud_print_token_store.h',
722 'service/cloud_print/cloud_print_url_fetcher.cc',
723 'service/cloud_print/cloud_print_url_fetcher.h',
724 'service/cloud_print/cloud_print_wipeout.cc',
725 'service/cloud_print/cloud_print_wipeout.h',
726 'service/cloud_print/connector_settings.cc',
727 'service/cloud_print/connector_settings.h',
728 'service/cloud_print/job_status_updater.cc',
729 'service/cloud_print/job_status_updater.h',
730 'service/cloud_print/print_system.cc',
731 'service/cloud_print/print_system.h',
732 'service/cloud_print/print_system_win.cc',
733 'service/cloud_print/printer_job_handler.cc',
734 'service/cloud_print/printer_job_handler.h',
735 'service/cloud_print/printer_job_queue_handler.cc',
736 'service/cloud_print/printer_job_queue_handler.h',
737 'service/net/service_url_request_context_getter.cc',
738 'service/net/service_url_request_context_getter.h',
739 'service/service_ipc_server.cc',
740 'service/service_ipc_server.h',
741 'service/service_main.cc',
742 'service/service_process.cc',
743 'service/service_process.h',
744 'service/service_process_prefs.cc',
745 'service/service_process_prefs.h',
746 'service/service_utility_process_host.cc',
747 'service/service_utility_process_host.h',
755 '../printing/printing.gyp:cups',
758 'service/cloud_print/print_system_cups.cc',
761 ['OS!="win" and use_cups!=1', {
763 'service/cloud_print/print_system_dummy.cc',
768 'service/service_utility_process_host.cc',
769 'service/service_utility_process_host.h',