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 ['enable_printing!=0', {
44 'chromium_browser_dependencies': [
45 '../printing/printing.gyp:printing',
48 ['enable_printing==1', {
49 'chromium_browser_dependencies': [
54 'platform_locale_settings_grd':
55 'app/resources/locale_settings_win.grd',
61 ['branding=="Chrome"', {
62 'platform_locale_settings_grd':
63 'app/resources/locale_settings_google_chromeos.grd',
64 }, { # branding!=Chrome
65 'platform_locale_settings_grd':
66 'app/resources/locale_settings_chromiumos.grd',
70 'platform_locale_settings_grd':
71 'app/resources/locale_settings_linux.grd',
75 ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "linux"', {
76 'platform_locale_settings_grd':
77 'app/resources/locale_settings_linux.grd',
80 'tweak_info_plist_path': '../build/mac/tweak_info_plist.py',
81 'platform_locale_settings_grd':
82 'app/resources/locale_settings_mac.grd',
87 # Place some targets in gypi files to reduce contention on this file.
88 # By using an include, we keep everything in a single xcodeproj file.
89 # Note on Win64 targets: targets that end with win64 be used
90 # on 64-bit Windows only. Targets that end with nacl_win64 should be used
91 # by Native Client only.
92 # NOTE: Most new includes should go in the OS!="ios" condition below.
93 '../build/chrome_settings.gypi',
94 '../build/util/version.gypi',
95 '../build/win_precompile.gypi',
96 'chrome_browser.gypi',
97 'chrome_browser_ui.gypi',
99 'chrome_installer_util.gypi',
100 '../components/nacl/nacl_defines.gypi',
106 'chrome_debugger.gypi',
109 'chrome_installer.gypi',
110 'chrome_plugin.gypi',
111 'chrome_renderer.gypi',
113 'chrome_tests_unit.gypi',
114 'chrome_utility.gypi',
115 'policy_templates.gypi',
119 'target_name': 'default_extensions',
125 'destination': '<(PRODUCT_DIR)/extensions',
127 'browser/extensions/default_extensions/external_extensions.json'
138 'app_shim/app_shim.gypi',
139 'browser/apps/app_shim/browser_app_shim.gypi',
143 'target_name': 'helper_app',
144 'type': 'executable',
145 'variables': { 'enable_wexit_time_destructors': 1, },
146 'product_name': '<(mac_product_name) Helper',
150 'infoplist_strings_tool',
153 # chrome_exe_main_mac.cc's main() is the entry point for
154 # the "chrome" (browser app) target. All it does is jump
155 # to chrome_dll's ChromeMain. This is appropriate for
156 # helper processes too, because the logic to discriminate
157 # between process types at run time is actually directed
158 # by the --type command line argument processed by
159 # ChromeMain. Sharing chrome_exe_main_mac.cc with the
160 # browser app will suffice for now.
161 'app/chrome_exe_main_mac.cc',
162 'app/helper-Info.plist',
164 # TODO(mark): Come up with a fancier way to do this. It should only
165 # be necessary to list helper-Info.plist once, not the three times it
167 'mac_bundle_resources!': [
168 'app/helper-Info.plist',
170 # TODO(mark): For now, don't put any resources into this app. Its
171 # resources directory will be a symbolic link to the browser app's
172 # resources directory.
173 'mac_bundle_resources/': [
177 'CHROMIUM_BUNDLE_ID': '<(mac_bundle_id)',
178 'CHROMIUM_SHORT_NAME': '<(branding)',
179 'CHROMIUM_STRIP_SAVE_FILE': 'app/app.saves',
180 'INFOPLIST_FILE': 'app/helper-Info.plist',
184 # The helper doesn't have real localizations, it just has
185 # empty .lproj directories, which is enough to convince Cocoa
186 # that anything running out of the helper .app supports those
188 'postbuild_name': 'Make Empty Localizations',
191 '>!@(<(apply_locales_cmd) -d ZZLOCALE.lproj <(locales))',
195 'tools/build/mac/make_locale_dirs.sh',
200 # The framework (chrome_dll) defines its load-time path
201 # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
202 # (chrome). A different relative path needs to be used in
204 'postbuild_name': 'Fix Framework Link',
208 '@executable_path/../Versions/<(version_full)/<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
209 '@executable_path/../../../<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
210 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
214 # Modify the Info.plist as needed. The script explains why this
215 # is needed. This is also done in the chrome and chrome_dll
216 # targets. In this case, --breakpad=0, --keystone=0, and --scm=0
217 # are used because Breakpad, Keystone, and SCM keys are
218 # never placed into the helper.
219 'postbuild_name': 'Tweak Info.plist',
220 'action': ['<(tweak_info_plist_path)',
226 # Make sure there isn't any Objective-C in the helper app's
228 'postbuild_name': 'Verify No Objective-C',
230 '../build/mac/verify_no_objc.sh',
235 ['mac_breakpad==1', {
237 # A real .dSYM is needed for dump_syms to operate on.
241 # With mac_real_dsym set, strip_from_xcode won't be used.
242 # Specify CHROMIUM_STRIP_SAVE_FILE directly to Xcode.
243 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
248 # Override the outer definition of CHROMIUM_STRIP_SAVE_FILE.
249 'CHROMIUM_STRIP_SAVE_FILE': 'app/app_asan.saves',
252 ['component=="shared_library"', {
254 'LD_RUNPATH_SEARCH_PATHS': [
255 # Get back from Chromium.app/Contents/Versions/V/
256 # Helper.app/Contents/MacOS
257 '@loader_path/../../../../../../..',
262 }, # target helper_app
264 # A library containing the actual code for the app mode app, shared
266 'target_name': 'app_mode_app_support',
267 'type': 'static_library',
268 'variables': { 'enable_wexit_time_destructors': 1, },
269 'product_name': 'app_mode_app_support',
271 '../base/base.gyp:base',
272 'common_constants.gyp:common_constants',
275 'common/mac/app_mode_chrome_locator.h',
276 'common/mac/app_mode_chrome_locator.mm',
277 'common/mac/app_mode_common.h',
278 'common/mac/app_mode_common.mm',
283 }, # target app_mode_app_support
285 # Convenience target to build a disk image.
286 'target_name': 'build_app_dmg',
287 # Don't place this in the 'all' list; most won't want it.
288 # In GYP, booleans are 0/1, not True/False.
289 'suppress_wildcard': 1,
295 'build_app_dmg_script_path': 'tools/build/mac/build_app_dmg',
296 'pkg_dmg_script_path': 'installer/mac/pkg-dmg',
299 # This duplicates the output path from build_app_dmg.
300 ['branding=="Chrome"', {
301 'dmg_name': 'GoogleChrome.dmg',
302 }, { # else: branding!="Chrome"
303 'dmg_name': 'Chromium.dmg',
310 '<(build_app_dmg_script_path)',
311 '<(pkg_dmg_script_path)',
312 '<(PRODUCT_DIR)/<(mac_product_name).app',
315 '<(PRODUCT_DIR)/<(dmg_name)',
317 'action_name': 'build_app_dmg',
318 'action': ['<(build_app_dmg_script_path)', '<@(branding)'],
323 'target_name': 'infoplist_strings_tool',
324 'type': 'executable',
325 'variables': { 'enable_wexit_time_destructors': 1, },
327 'chrome_resources.gyp:chrome_strings',
328 '../base/base.gyp:base',
329 '../ui/base/ui_base.gyp:ui_base',
330 '../ui/gfx/gfx.gyp:gfx',
331 '../ui/gfx/gfx.gyp:gfx_geometry',
337 'tools/mac_helpers/infoplist_strings_util.mm',
345 'target_name': 'linux_symbols',
348 ['linux_dump_symbols==1', {
351 'action_name': 'dump_symbols',
353 '<(DEPTH)/build/linux/dump_app_syms',
354 '<(PRODUCT_DIR)/dump_syms',
355 '<(PRODUCT_DIR)/chrome',
358 '<(PRODUCT_DIR)/chrome.breakpad.<(target_arch)',
360 'action': ['<(DEPTH)/build/linux/dump_app_syms',
361 '<(PRODUCT_DIR)/dump_syms',
362 '<(linux_strip_binary)',
363 '<(PRODUCT_DIR)/chrome',
365 'message': 'Dumping breakpad symbols to <(_outputs)',
366 'process_outputs_as_sources': 1,
371 '../breakpad/breakpad.gyp:dump_syms',
381 # For historical reasons, chrome/chrome.sln has been the entry point
382 # for new Chrome developers. To assist development, include several
383 # core unittests that are otherwise only accessible side-by-side with
384 # chrome via all/all.sln.
385 'target_name': 'test_targets',
388 '../base/base.gyp:base_unittests',
389 '../content/content_shell_and_tests.gyp:content_browsertests',
390 '../content/content_shell_and_tests.gyp:content_shell',
391 '../content/content_shell_and_tests.gyp:content_unittests',
392 '../net/net.gyp:net_unittests',
393 '../ui/base/ui_base_tests.gyp:ui_base_unittests',
394 '../ui/base/ui_base_tests.gyp:ui_unittests',
398 'target_name': 'chrome_version_resources',
401 ['branding == "Chrome"', {
403 'branding_path': 'app/theme/google_chrome/BRANDING',
405 }, { # else branding!="Chrome"
407 'branding_path': 'app/theme/chromium/BRANDING',
412 'output_dir': 'chrome_version',
413 'template_input_path': 'app/chrome_version.rc.version',
415 'direct_dependent_settings': {
417 '<(SHARED_INTERMEDIATE_DIR)/<(output_dir)',
421 'app/chrome_exe.ver',
422 'app/chrome_dll.ver',
423 'app/nacl64_exe.ver',
427 'version_resource_rules.gypi',
431 # GN version: //chrome:version_header
432 'target_name': 'chrome_version_header',
434 'hard_dependency': 1,
437 'action_name': 'version_header',
440 '<(DEPTH)/build/util/LASTCHANGE',
443 ['branding == "Chrome"', {
445 'branding_path': 'app/theme/google_chrome/BRANDING',
447 }, { # else branding!="Chrome"
449 'branding_path': 'app/theme/chromium/BRANDING',
456 '<(lastchange_path)',
460 '<(SHARED_INTERMEDIATE_DIR)/version.h',
464 '<(version_py_path)',
465 '-f', '<(version_path)',
466 '-f', '<(branding_path)',
467 '-f', '<(lastchange_path)',
471 'message': 'Generating version header file: <@(_outputs)',
476 'target_name': 'crash_service',
477 'type': 'executable',
480 '../base/base.gyp:base',
481 '../chrome/common_constants.gyp:common_constants',
482 '../components/components.gyp:breakpad_crash_service',
488 'tools/crash_service/main.cc',
492 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
497 'target_name': 'sb_sigutil',
498 'type': 'executable',
500 '../base/base.gyp:base',
501 'safe_browsing_proto',
504 'browser/safe_browsing/binary_feature_extractor.h',
505 'browser/safe_browsing/binary_feature_extractor_win.cc',
506 'browser/safe_browsing/pe_image_reader_win.cc',
507 'browser/safe_browsing/pe_image_reader_win.h',
508 'tools/safe_browsing/sb_sigutil.cc',
513 'chrome_process_finder.gypi',
517 ['OS=="win" and target_arch=="ia32"',
520 'target_name': 'chrome_user32_delay_imports',
523 'lib_dir': '<(INTERMEDIATE_DIR)',
526 'chrome.user32.delay.imports'
529 '../build/win/importlibs/create_import_lib.gypi',
531 'direct_dependent_settings': {
534 'AdditionalLibraryDirectories': ['<(lib_dir)', ],
535 'AdditionalDependencies': ['chrome.user32.delay.lib', ],
541 'target_name': 'crash_service_win64',
542 'type': 'executable',
543 'product_name': 'crash_service64',
545 'installer_util_nacl_win64',
546 '../base/base.gyp:base_static_win64',
547 '../chrome/common_constants.gyp:common_constants_win64',
548 '../components/components.gyp:breakpad_crash_service_win64',
554 'tools/crash_service/main.cc',
555 '../content/public/common/content_switches.cc',
558 'COMPILE_CONTENT_STATICALLY',
562 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
567 'msvs_target_platform': 'x64',
572 ], # OS=="win" and target_arch=="ia32"
574 'includes': [ 'chrome_browser_chromeos.gypi' ],
580 # GN: //chrome/android:chrome_java
581 'target_name': 'chrome_java',
584 'activity_type_ids_java',
585 'app_banner_metrics_ids_java',
586 'chrome_resources.gyp:chrome_strings',
587 'chrome_strings_grd',
588 'chrome_version_java',
589 'profile_account_management_metrics_java',
590 'content_setting_java',
591 'content_settings_type_java',
592 'page_info_connection_type_java',
593 'profile_sync_service_model_type_selection_java',
595 'toolbar_model_security_levels_java',
596 'tab_load_status_java',
597 '../base/base.gyp:base',
598 '../components/components.gyp:bookmarks_java',
599 '../components/components.gyp:dom_distiller_core_java',
600 '../components/components.gyp:gcm_driver_java',
601 '../components/components.gyp:invalidation_java',
602 '../components/components.gyp:navigation_interception_java',
603 '../components/components.gyp:variations_java',
604 '../components/components.gyp:web_contents_delegate_android_java',
605 '../content/content.gyp:content_java',
606 '../printing/printing.gyp:printing_java',
607 '../sync/sync.gyp:sync_java',
608 '../third_party/android_tools/android_tools.gyp:android_support_v7_appcompat_javalib',
609 '../third_party/android_tools/android_tools.gyp:android_support_v13_javalib',
610 '../ui/android/ui_android.gyp:ui_java',
613 'java_in_dir': '../chrome/android/java',
614 'has_java_resources': 1,
615 'R_package': 'org.chromium.chrome',
616 'R_package_relpath': 'org/chromium/chrome',
617 # Include xml string files generated from generated_resources.grd
618 'res_extra_dirs': ['<(SHARED_INTERMEDIATE_DIR)/chrome/java/res'],
619 'res_extra_files': ['<!@pymod_do_main(grit_info <@(grit_defines) --outputs "<(SHARED_INTERMEDIATE_DIR)/chrome" app/generated_resources.grd)'],
622 '../build/java.gypi',
626 # GN: //chrome/android:chrome_strings_grd
627 'target_name': 'chrome_strings_grd',
630 'grd_file': '../chrome/android/java/strings/android_chrome_strings.grd',
633 '../build/java_strings_grd.gypi',
637 # GN: //chrome:content_setting_javagen
638 'target_name': 'content_setting_java',
641 'source_file': '../components/content_settings/core/common/content_settings.h',
643 'includes': [ '../build/android/java_cpp_enum.gypi' ],
646 # GN: //chrome:content_settings_type_javagen
647 'target_name': 'content_settings_type_java',
650 'source_file': '../components/content_settings/core/common/content_settings_types.h',
652 'includes': [ '../build/android/java_cpp_enum.gypi' ],
655 # GN: //chrome:page_info_connection_type_javagen
656 'target_name': 'page_info_connection_type_java',
659 'source_file': 'browser/ui/android/website_settings_popup_android.h',
661 'includes': [ '../build/android/java_cpp_enum.gypi' ],
665 'chrome_android.gypi',
668 ['configuration_policy==1 and OS!="android" and OS!="ios"', {
669 'includes': [ 'policy.gypi', ],
671 ['enable_extensions==1', {
673 'chrome_browser_extensions.gypi',
676 ['enable_printing==1', {
679 # GN version: //chrome/service
680 'target_name': 'service',
681 'type': 'static_library',
682 'variables': { 'enable_wexit_time_destructors': 1, },
684 'chrome_resources.gyp:chrome_strings',
687 '../base/base.gyp:base',
688 '../components/components.gyp:cloud_devices_common',
689 '../google_apis/google_apis.gyp:google_apis',
690 '../jingle/jingle.gyp:notifier',
691 '../net/net.gyp:net',
692 '../printing/printing.gyp:printing',
693 '../skia/skia.gyp:skia',
694 '../third_party/libjingle/libjingle.gyp:libjingle',
697 # Note: sources list duplicated in GN build.
698 'service/cloud_print/cdd_conversion_win.cc',
699 'service/cloud_print/cdd_conversion_win.h',
700 'service/cloud_print/cloud_print_auth.cc',
701 'service/cloud_print/cloud_print_auth.h',
702 'service/cloud_print/cloud_print_connector.cc',
703 'service/cloud_print/cloud_print_connector.h',
704 'service/cloud_print/cloud_print_proxy.cc',
705 'service/cloud_print/cloud_print_proxy.h',
706 'service/cloud_print/cloud_print_proxy_backend.cc',
707 'service/cloud_print/cloud_print_proxy_backend.h',
708 'service/cloud_print/cloud_print_service_helpers.cc',
709 'service/cloud_print/cloud_print_service_helpers.h',
710 'service/cloud_print/cloud_print_token_store.cc',
711 'service/cloud_print/cloud_print_token_store.h',
712 'service/cloud_print/cloud_print_url_fetcher.cc',
713 'service/cloud_print/cloud_print_url_fetcher.h',
714 'service/cloud_print/cloud_print_wipeout.cc',
715 'service/cloud_print/cloud_print_wipeout.h',
716 'service/cloud_print/connector_settings.cc',
717 'service/cloud_print/connector_settings.h',
718 'service/cloud_print/job_status_updater.cc',
719 'service/cloud_print/job_status_updater.h',
720 'service/cloud_print/print_system.cc',
721 'service/cloud_print/print_system.h',
722 'service/cloud_print/print_system_win.cc',
723 'service/cloud_print/printer_job_handler.cc',
724 'service/cloud_print/printer_job_handler.h',
725 'service/cloud_print/printer_job_queue_handler.cc',
726 'service/cloud_print/printer_job_queue_handler.h',
727 'service/net/service_url_request_context_getter.cc',
728 'service/net/service_url_request_context_getter.h',
729 'service/service_ipc_server.cc',
730 'service/service_ipc_server.h',
731 'service/service_main.cc',
732 'service/service_process.cc',
733 'service/service_process.h',
734 'service/service_process_prefs.cc',
735 'service/service_process_prefs.h',
736 'service/service_utility_process_host.cc',
737 'service/service_utility_process_host.h',
745 '../printing/printing.gyp:cups',
748 'service/cloud_print/print_system_cups.cc',
751 ['OS!="win" and use_cups!=1', {
753 'service/cloud_print/print_system_dummy.cc',
758 'service/service_utility_process_host.cc',
759 'service/service_utility_process_host.h',