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.
13 'chromium_browser_dependencies': [
16 '../sync/sync.gyp:sync',
18 'chromium_child_dependencies': [
20 '../sync/sync.gyp:sync',
22 'allocator_target': '../base/allocator/allocator.gyp:allocator',
23 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chrome',
24 'protoc_out_dir': '<(SHARED_INTERMEDIATE_DIR)/protoc_out',
27 'chromium_browser_dependencies': [
28 '../ppapi/ppapi_internal.gyp:ppapi_host',
30 'chromium_child_dependencies': [
35 '../content/content.gyp:content_gpu',
36 '../content/content.gyp:content_ppapi_plugin',
37 '../third_party/WebKit/public/blink_devtools.gyp:blink_devtools_frontend_resources',
40 ['enable_printing!=0', {
41 'chromium_browser_dependencies': [
42 '../printing/printing.gyp:printing',
45 ['enable_printing==1', {
46 'chromium_browser_dependencies': [
51 'platform_locale_settings_grd':
52 'app/resources/locale_settings_win.grd',
58 ['branding=="Chrome"', {
59 'platform_locale_settings_grd':
60 'app/resources/locale_settings_google_chromeos.grd',
61 }, { # branding!=Chrome
62 'platform_locale_settings_grd':
63 'app/resources/locale_settings_chromiumos.grd',
67 'platform_locale_settings_grd':
68 'app/resources/locale_settings_linux.grd',
72 ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "linux"', {
73 'platform_locale_settings_grd':
74 'app/resources/locale_settings_linux.grd',
77 'tweak_info_plist_path': '../build/mac/tweak_info_plist.py',
78 'platform_locale_settings_grd':
79 'app/resources/locale_settings_mac.grd',
84 # Place some targets in gypi files to reduce contention on this file.
85 # By using an include, we keep everything in a single xcodeproj file.
86 # Note on Win64 targets: targets that end with win64 be used
87 # on 64-bit Windows only. Targets that end with nacl_win64 should be used
88 # by Native Client only.
89 # NOTE: Most new includes should go in the OS!="ios" condition below.
90 '../build/chrome_settings.gypi',
91 '../build/util/version.gypi',
92 '../build/win_precompile.gypi',
93 'chrome_browser.gypi',
94 'chrome_browser_ui.gypi',
96 'chrome_installer_util.gypi',
97 '../components/nacl/nacl_defines.gypi',
103 'chrome_debugger.gypi',
106 'chrome_installer.gypi',
107 'chrome_plugin.gypi',
108 'chrome_renderer.gypi',
110 'chrome_tests_unit.gypi',
111 'chrome_utility.gypi',
112 'policy_templates.gypi',
116 'target_name': 'default_extensions',
122 'destination': '<(PRODUCT_DIR)/extensions',
124 'browser/extensions/default_extensions/external_extensions.json'
135 '../apps/app_shim/app_shim.gypi',
139 'target_name': 'helper_app',
140 'type': 'executable',
141 'variables': { 'enable_wexit_time_destructors': 1, },
142 'product_name': '<(mac_product_name) Helper',
146 'infoplist_strings_tool',
149 # chrome_exe_main_mac.cc's main() is the entry point for
150 # the "chrome" (browser app) target. All it does is jump
151 # to chrome_dll's ChromeMain. This is appropriate for
152 # helper processes too, because the logic to discriminate
153 # between process types at run time is actually directed
154 # by the --type command line argument processed by
155 # ChromeMain. Sharing chrome_exe_main_mac.cc with the
156 # browser app will suffice for now.
157 'app/chrome_exe_main_mac.cc',
158 'app/helper-Info.plist',
160 # TODO(mark): Come up with a fancier way to do this. It should only
161 # be necessary to list helper-Info.plist once, not the three times it
163 'mac_bundle_resources!': [
164 'app/helper-Info.plist',
166 # TODO(mark): For now, don't put any resources into this app. Its
167 # resources directory will be a symbolic link to the browser app's
168 # resources directory.
169 'mac_bundle_resources/': [
173 'CHROMIUM_BUNDLE_ID': '<(mac_bundle_id)',
174 'CHROMIUM_SHORT_NAME': '<(branding)',
175 'CHROMIUM_STRIP_SAVE_FILE': 'app/app.saves',
176 'INFOPLIST_FILE': 'app/helper-Info.plist',
180 # The helper doesn't have real localizations, it just has
181 # empty .lproj directories, which is enough to convince Cocoa
182 # that anything running out of the helper .app supports those
184 'postbuild_name': 'Make Empty Localizations',
187 '>!@(<(apply_locales_cmd) -d ZZLOCALE.lproj <(locales))',
191 'tools/build/mac/make_locale_dirs.sh',
196 # The framework (chrome_dll) defines its load-time path
197 # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
198 # (chrome). A different relative path needs to be used in
200 'postbuild_name': 'Fix Framework Link',
204 '@executable_path/../Versions/<(version_full)/<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
205 '@executable_path/../../../<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
206 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
210 # Modify the Info.plist as needed. The script explains why this
211 # is needed. This is also done in the chrome and chrome_dll
212 # targets. In this case, --breakpad=0, --keystone=0, and --scm=0
213 # are used because Breakpad, Keystone, and SCM keys are
214 # never placed into the helper.
215 'postbuild_name': 'Tweak Info.plist',
216 'action': ['<(tweak_info_plist_path)',
222 # Make sure there isn't any Objective-C in the helper app's
224 'postbuild_name': 'Verify No Objective-C',
226 '../build/mac/verify_no_objc.sh',
231 ['mac_breakpad==1', {
233 # A real .dSYM is needed for dump_syms to operate on.
237 # With mac_real_dsym set, strip_from_xcode won't be used.
238 # Specify CHROMIUM_STRIP_SAVE_FILE directly to Xcode.
239 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
244 # Override the outer definition of CHROMIUM_STRIP_SAVE_FILE.
245 'CHROMIUM_STRIP_SAVE_FILE': 'app/app_asan.saves',
248 ['component=="shared_library"', {
250 'LD_RUNPATH_SEARCH_PATHS': [
251 # Get back from Chromium.app/Contents/Versions/V/
252 # Helper.app/Contents/MacOS
253 '@loader_path/../../../../../../..',
258 }, # target helper_app
260 # A library containing the actual code for the app mode app, shared
262 'target_name': 'app_mode_app_support',
263 'type': 'static_library',
264 'variables': { 'enable_wexit_time_destructors': 1, },
265 'product_name': 'app_mode_app_support',
267 '../base/base.gyp:base',
268 'common_constants.gyp:common_constants',
271 'common/mac/app_mode_chrome_locator.h',
272 'common/mac/app_mode_chrome_locator.mm',
273 'common/mac/app_mode_common.h',
274 'common/mac/app_mode_common.mm',
279 }, # target app_mode_app_support
281 # This produces the template for app mode loader bundles. It's a
282 # template in the sense that parts of it need to be "filled in" by
283 # Chrome before it can be executed.
284 'target_name': 'app_mode_app',
285 'type': 'executable',
288 'enable_wexit_time_destructors': 1,
291 'product_name': 'app_mode_loader',
293 'app_mode_app_support',
294 'infoplist_strings_tool',
297 'app/app_mode_loader_mac.mm',
298 'app/app_mode-Info.plist',
305 '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
306 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
309 'mac_bundle_resources!': [
310 'app/app_mode-Info.plist',
312 'mac_bundle_resources/': [
316 'INFOPLIST_FILE': 'app/app_mode-Info.plist',
317 'APP_MODE_APP_BUNDLE_ID': '<(mac_bundle_id).app.@APP_MODE_SHORTCUT_ID@',
321 # Modify the Info.plist as needed. The script explains why this
322 # is needed. This is also done in the chrome and chrome_dll
323 # targets. In this case, --breakpad=0, --keystone=0, and --scm=0
324 # are used because Breakpad, Keystone, and SCM keys are
325 # never placed into the app mode loader.
326 'postbuild_name': 'Tweak Info.plist',
327 'action': ['<(tweak_info_plist_path)',
333 }, # target app_mode_app
335 # Convenience target to build a disk image.
336 'target_name': 'build_app_dmg',
337 # Don't place this in the 'all' list; most won't want it.
338 # In GYP, booleans are 0/1, not True/False.
339 'suppress_wildcard': 1,
345 'build_app_dmg_script_path': 'tools/build/mac/build_app_dmg',
346 'pkg_dmg_script_path': 'installer/mac/pkg-dmg',
349 # This duplicates the output path from build_app_dmg.
350 ['branding=="Chrome"', {
351 'dmg_name': 'GoogleChrome.dmg',
352 }, { # else: branding!="Chrome"
353 'dmg_name': 'Chromium.dmg',
360 '<(build_app_dmg_script_path)',
361 '<(pkg_dmg_script_path)',
362 '<(PRODUCT_DIR)/<(mac_product_name).app',
365 '<(PRODUCT_DIR)/<(dmg_name)',
367 'action_name': 'build_app_dmg',
368 'action': ['<(build_app_dmg_script_path)', '<@(branding)'],
373 'target_name': 'infoplist_strings_tool',
374 'type': 'executable',
375 'variables': { 'enable_wexit_time_destructors': 1, },
377 'chrome_resources.gyp:chrome_strings',
378 '../base/base.gyp:base',
379 '../ui/base/ui_base.gyp:ui_base',
380 '../ui/gfx/gfx.gyp:gfx',
381 '../ui/gfx/gfx.gyp:gfx_geometry',
387 'tools/mac_helpers/infoplist_strings_util.mm',
395 'target_name': 'linux_symbols',
398 ['linux_dump_symbols==1', {
401 'action_name': 'dump_symbols',
403 '<(DEPTH)/build/linux/dump_app_syms',
404 '<(PRODUCT_DIR)/dump_syms',
405 '<(PRODUCT_DIR)/chrome',
408 '<(PRODUCT_DIR)/chrome.breakpad.<(target_arch)',
410 'action': ['<(DEPTH)/build/linux/dump_app_syms',
411 '<(PRODUCT_DIR)/dump_syms',
412 '<(linux_strip_binary)',
413 '<(PRODUCT_DIR)/chrome',
415 'message': 'Dumping breakpad symbols to <(_outputs)',
416 'process_outputs_as_sources': 1,
421 '../breakpad/breakpad.gyp:dump_syms',
431 # For historical reasons, chrome/chrome.sln has been the entry point
432 # for new Chrome developers. To assist development, include several
433 # core unittests that are otherwise only accessible side-by-side with
434 # chrome via all/all.sln.
435 'target_name': 'test_targets',
438 '../base/base.gyp:base_unittests',
439 '../content/content_shell_and_tests.gyp:content_browsertests',
440 '../content/content_shell_and_tests.gyp:content_shell',
441 '../content/content_shell_and_tests.gyp:content_unittests',
442 '../net/net.gyp:net_unittests',
443 '../ui/ui_unittests.gyp:ui_unittests',
447 'target_name': 'chrome_version_resources',
450 ['branding == "Chrome"', {
452 'branding_path': 'app/theme/google_chrome/BRANDING',
454 }, { # else branding!="Chrome"
456 'branding_path': 'app/theme/chromium/BRANDING',
461 'output_dir': 'chrome_version',
462 'template_input_path': 'app/chrome_version.rc.version',
464 'direct_dependent_settings': {
466 '<(SHARED_INTERMEDIATE_DIR)/<(output_dir)',
470 'app/chrome_exe.ver',
471 'app/chrome_dll.ver',
472 'app/nacl64_exe.ver',
476 'version_resource_rules.gypi',
480 'target_name': 'chrome_version_header',
482 'hard_dependency': 1,
485 'action_name': 'version_header',
488 '<(DEPTH)/build/util/LASTCHANGE',
491 ['branding == "Chrome"', {
493 'branding_path': 'app/theme/google_chrome/BRANDING',
495 }, { # else branding!="Chrome"
497 'branding_path': 'app/theme/chromium/BRANDING',
504 '<(lastchange_path)',
508 '<(SHARED_INTERMEDIATE_DIR)/version.h',
512 '<(version_py_path)',
513 '-f', '<(version_path)',
514 '-f', '<(branding_path)',
515 '-f', '<(lastchange_path)',
519 'message': 'Generating version header file: <@(_outputs)',
524 'target_name': 'crash_service',
525 'type': 'executable',
528 '../base/base.gyp:base',
529 '../chrome/common_constants.gyp:common_constants',
530 '../components/components.gyp:breakpad_crash_service',
536 'tools/crash_service/main.cc',
540 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
545 'target_name': 'sb_sigutil',
546 'type': 'executable',
548 '../base/base.gyp:base',
549 'safe_browsing_proto',
552 'browser/safe_browsing/binary_feature_extractor.h',
553 'browser/safe_browsing/binary_feature_extractor_win.cc',
554 'browser/safe_browsing/pe_image_reader_win.cc',
555 'browser/safe_browsing/pe_image_reader_win.h',
556 'tools/safe_browsing/sb_sigutil.cc',
561 'chrome_process_finder.gypi',
565 ['OS=="win" and target_arch=="ia32"',
568 'target_name': 'chrome_user32_delay_imports',
571 'lib_dir': '<(INTERMEDIATE_DIR)',
574 'chrome.user32.delay.imports'
577 '../build/win/importlibs/create_import_lib.gypi',
579 'direct_dependent_settings': {
582 'AdditionalLibraryDirectories': ['<(lib_dir)', ],
583 'AdditionalDependencies': ['chrome.user32.delay.lib', ],
589 'target_name': 'crash_service_win64',
590 'type': 'executable',
591 'product_name': 'crash_service64',
593 'installer_util_nacl_win64',
594 '../base/base.gyp:base_static_win64',
595 '../chrome/common_constants.gyp:common_constants_win64',
596 '../components/components.gyp:breakpad_crash_service_win64',
602 'tools/crash_service/main.cc',
603 '../content/public/common/content_switches.cc',
606 'COMPILE_CONTENT_STATICALLY',
610 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
615 'msvs_target_platform': 'x64',
620 ], # OS=="win" and target_arch=="ia32"
622 'includes': [ 'chrome_browser_chromeos.gypi' ],
628 'target_name': 'chrome_java',
631 'activity_type_ids_java',
632 'app_banner_metrics_ids_java',
633 'chrome_resources.gyp:chrome_strings',
634 'chrome_strings_grd',
635 'profile_sync_service_model_type_selection_java',
637 'toolbar_model_security_levels_java',
638 'tab_load_status_java',
639 '../base/base.gyp:base',
640 '../components/components.gyp:autofill_java',
641 '../components/components.gyp:bookmarks_java',
642 '../components/components.gyp:dom_distiller_core_java',
643 '../components/components.gyp:enhanced_bookmarks_java',
644 '../components/components.gyp:gcm_driver_java',
645 '../components/components.gyp:navigation_interception_java',
646 '../components/components.gyp:sessions',
647 '../components/components.gyp:variations_java',
648 '../components/components.gyp:web_contents_delegate_android_java',
649 '../content/content.gyp:content_java',
650 '../printing/printing.gyp:printing_java',
651 '../sync/sync.gyp:sync_java',
652 '../third_party/android_tools/android_tools.gyp:android_support_v7_appcompat_javalib',
653 '../third_party/guava/guava.gyp:guava_javalib',
654 '../ui/android/ui_android.gyp:ui_java',
657 'java_in_dir': '../chrome/android/java',
658 'has_java_resources': 1,
659 'R_package': 'org.chromium.chrome',
660 'R_package_relpath': 'org/chromium/chrome',
661 # Include xml string files generated from generated_resources.grd
662 'res_extra_dirs': ['<(SHARED_INTERMEDIATE_DIR)/chrome/java/res'],
663 'res_extra_files': ['<!@pymod_do_main(grit_info <@(grit_defines) --outputs "<(SHARED_INTERMEDIATE_DIR)/chrome" app/generated_resources.grd)'],
666 '../build/java.gypi',
670 'target_name': 'chrome_strings_grd',
673 'grd_file': '../chrome/android/java/strings/android_chrome_strings.grd',
676 '../build/java_strings_grd.gypi',
681 'chrome_android.gypi',
684 ['configuration_policy==1 and OS!="android" and OS!="ios"', {
685 'includes': [ 'policy.gypi', ],
687 ['enable_extensions==1', {
689 'chrome_browser_extensions.gypi',
692 ['enable_printing==1', {
695 # GN version: //chrome/service
696 'target_name': 'service',
697 'type': 'static_library',
698 'variables': { 'enable_wexit_time_destructors': 1, },
700 'chrome_resources.gyp:chrome_strings',
703 '../base/base.gyp:base',
704 '../components/components.gyp:cloud_devices_common',
705 '../google_apis/google_apis.gyp:google_apis',
706 '../jingle/jingle.gyp:notifier',
707 '../net/net.gyp:net',
708 '../printing/printing.gyp:printing',
709 '../skia/skia.gyp:skia',
710 '../third_party/libjingle/libjingle.gyp:libjingle',
713 # Note: sources list duplicated in GN build.
714 'service/cloud_print/cdd_conversion_win.cc',
715 'service/cloud_print/cdd_conversion_win.h',
716 'service/cloud_print/cloud_print_auth.cc',
717 'service/cloud_print/cloud_print_auth.h',
718 'service/cloud_print/cloud_print_connector.cc',
719 'service/cloud_print/cloud_print_connector.h',
720 'service/cloud_print/cloud_print_proxy.cc',
721 'service/cloud_print/cloud_print_proxy.h',
722 'service/cloud_print/cloud_print_proxy_backend.cc',
723 'service/cloud_print/cloud_print_proxy_backend.h',
724 'service/cloud_print/cloud_print_service_helpers.cc',
725 'service/cloud_print/cloud_print_service_helpers.h',
726 'service/cloud_print/cloud_print_token_store.cc',
727 'service/cloud_print/cloud_print_token_store.h',
728 'service/cloud_print/cloud_print_url_fetcher.cc',
729 'service/cloud_print/cloud_print_url_fetcher.h',
730 'service/cloud_print/cloud_print_wipeout.cc',
731 'service/cloud_print/cloud_print_wipeout.h',
732 'service/cloud_print/connector_settings.cc',
733 'service/cloud_print/connector_settings.h',
734 'service/cloud_print/job_status_updater.cc',
735 'service/cloud_print/job_status_updater.h',
736 'service/cloud_print/print_system.cc',
737 'service/cloud_print/print_system.h',
738 'service/cloud_print/print_system_win.cc',
739 'service/cloud_print/printer_job_handler.cc',
740 'service/cloud_print/printer_job_handler.h',
741 'service/cloud_print/printer_job_queue_handler.cc',
742 'service/cloud_print/printer_job_queue_handler.h',
743 'service/net/service_url_request_context_getter.cc',
744 'service/net/service_url_request_context_getter.h',
745 'service/service_ipc_server.cc',
746 'service/service_ipc_server.h',
747 'service/service_main.cc',
748 'service/service_process.cc',
749 'service/service_process.h',
750 'service/service_process_prefs.cc',
751 'service/service_process_prefs.h',
752 'service/service_utility_process_host.cc',
753 'service/service_utility_process_host.h',
761 '../printing/printing.gyp:cups',
764 'service/cloud_print/print_system_cups.cc',
767 ['OS!="win" and use_cups!=1', {
769 'service/cloud_print/print_system_dummy.cc',