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 '../content/content.gyp:content_worker',
38 '../third_party/WebKit/public/blink_devtools.gyp:blink_devtools_frontend_resources',
41 ['enable_printing!=0', {
42 'chromium_browser_dependencies': [
43 '../printing/printing.gyp:printing',
47 'platform_locale_settings_grd':
48 'app/resources/locale_settings_win.grd',
50 ['enable_printing==1', {
51 'chromium_browser_dependencies': [
59 ['branding=="Chrome"', {
60 'platform_locale_settings_grd':
61 'app/resources/locale_settings_google_chromeos.grd',
62 }, { # branding!=Chrome
63 'platform_locale_settings_grd':
64 'app/resources/locale_settings_chromiumos.grd',
68 'platform_locale_settings_grd':
69 'app/resources/locale_settings_linux.grd',
73 ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "linux"', {
74 'platform_locale_settings_grd':
75 'app/resources/locale_settings_linux.grd',
78 'tweak_info_plist_path': '../build/mac/tweak_info_plist.py',
79 'platform_locale_settings_grd':
80 'app/resources/locale_settings_mac.grd',
85 # Place some targets in gypi files to reduce contention on this file.
86 # By using an include, we keep everything in a single xcodeproj file.
87 # Note on Win64 targets: targets that end with win64 be used
88 # on 64-bit Windows only. Targets that end with nacl_win64 should be used
89 # by Native Client only.
90 # NOTE: Most new includes should go in the OS!="ios" condition below.
91 '../build/chrome_settings.gypi',
92 '../build/util/version.gypi',
93 '../build/win_precompile.gypi',
94 'chrome_browser.gypi',
95 'chrome_browser_ui.gypi',
97 'chrome_installer_util.gypi',
98 '../components/nacl/nacl_defines.gypi',
104 'chrome_browser_extensions.gypi',
105 'chrome_debugger.gypi',
108 'chrome_installer.gypi',
109 'chrome_plugin.gypi',
110 'chrome_renderer.gypi',
112 'chrome_tests_unit.gypi',
113 'chrome_utility.gypi',
114 'policy_templates.gypi',
118 'target_name': 'default_extensions',
124 'destination': '<(PRODUCT_DIR)/extensions',
126 'browser/extensions/default_extensions/external_extensions.json'
137 '../apps/app_shim/app_shim.gypi',
141 'target_name': 'helper_app',
142 'type': 'executable',
143 'variables': { 'enable_wexit_time_destructors': 1, },
144 'product_name': '<(mac_product_name) Helper',
148 'infoplist_strings_tool',
151 # chrome_exe_main_mac.cc's main() is the entry point for
152 # the "chrome" (browser app) target. All it does is jump
153 # to chrome_dll's ChromeMain. This is appropriate for
154 # helper processes too, because the logic to discriminate
155 # between process types at run time is actually directed
156 # by the --type command line argument processed by
157 # ChromeMain. Sharing chrome_exe_main_mac.cc with the
158 # browser app will suffice for now.
159 'app/chrome_exe_main_mac.cc',
160 'app/helper-Info.plist',
162 # TODO(mark): Come up with a fancier way to do this. It should only
163 # be necessary to list helper-Info.plist once, not the three times it
165 'mac_bundle_resources!': [
166 'app/helper-Info.plist',
168 # TODO(mark): For now, don't put any resources into this app. Its
169 # resources directory will be a symbolic link to the browser app's
170 # resources directory.
171 'mac_bundle_resources/': [
175 'CHROMIUM_BUNDLE_ID': '<(mac_bundle_id)',
176 'CHROMIUM_SHORT_NAME': '<(branding)',
177 'CHROMIUM_STRIP_SAVE_FILE': 'app/app.saves',
178 'INFOPLIST_FILE': 'app/helper-Info.plist',
182 # The helper doesn't have real localizations, it just has
183 # empty .lproj directories, which is enough to convince Cocoa
184 # that anything running out of the helper .app supports those
186 'postbuild_name': 'Make Empty Localizations',
189 '>!@(<(apply_locales_cmd) -d ZZLOCALE.lproj <(locales))',
193 'tools/build/mac/make_locale_dirs.sh',
198 # The framework (chrome_dll) defines its load-time path
199 # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
200 # (chrome). A different relative path needs to be used in
202 'postbuild_name': 'Fix Framework Link',
206 '@executable_path/../Versions/<(version_full)/<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
207 '@executable_path/../../../<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
208 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
212 # Modify the Info.plist as needed. The script explains why this
213 # is needed. This is also done in the chrome and chrome_dll
214 # targets. In this case, --breakpad=0, --keystone=0, and --scm=0
215 # are used because Breakpad, Keystone, and SCM keys are
216 # never placed into the helper.
217 'postbuild_name': 'Tweak Info.plist',
218 'action': ['<(tweak_info_plist_path)',
224 # Make sure there isn't any Objective-C in the helper app's
226 'postbuild_name': 'Verify No Objective-C',
228 '../build/mac/verify_no_objc.sh',
233 ['mac_breakpad==1', {
235 # A real .dSYM is needed for dump_syms to operate on.
239 # With mac_real_dsym set, strip_from_xcode won't be used.
240 # Specify CHROMIUM_STRIP_SAVE_FILE directly to Xcode.
241 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
246 # Override the outer definition of CHROMIUM_STRIP_SAVE_FILE.
247 'CHROMIUM_STRIP_SAVE_FILE': 'app/app_asan.saves',
250 ['component=="shared_library"', {
252 'LD_RUNPATH_SEARCH_PATHS': [
253 # Get back from Chromium.app/Contents/Versions/V/
254 # Helper.app/Contents/MacOS
255 '@loader_path/../../../../../../..',
260 }, # target helper_app
262 # A library containing the actual code for the app mode app, shared
264 'target_name': 'app_mode_app_support',
265 'type': 'static_library',
266 'variables': { 'enable_wexit_time_destructors': 1, },
267 'product_name': 'app_mode_app_support',
269 '../base/base.gyp:base',
270 'common_constants.gyp:common_constants',
273 'common/mac/app_mode_chrome_locator.h',
274 'common/mac/app_mode_chrome_locator.mm',
275 'common/mac/app_mode_common.h',
276 'common/mac/app_mode_common.mm',
281 }, # target app_mode_app_support
283 # This produces the template for app mode loader bundles. It's a
284 # template in the sense that parts of it need to be "filled in" by
285 # Chrome before it can be executed.
286 'target_name': 'app_mode_app',
287 'type': 'executable',
290 'enable_wexit_time_destructors': 1,
293 'product_name': 'app_mode_loader',
295 'app_mode_app_support',
296 'infoplist_strings_tool',
299 'app/app_mode_loader_mac.mm',
300 'app/app_mode-Info.plist',
307 '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
308 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
311 'mac_bundle_resources!': [
312 'app/app_mode-Info.plist',
314 'mac_bundle_resources/': [
318 'INFOPLIST_FILE': 'app/app_mode-Info.plist',
319 'APP_MODE_APP_BUNDLE_ID': '<(mac_bundle_id).app.@APP_MODE_SHORTCUT_ID@',
323 # Modify the Info.plist as needed. The script explains why this
324 # is needed. This is also done in the chrome and chrome_dll
325 # targets. In this case, --breakpad=0, --keystone=0, and --scm=0
326 # are used because Breakpad, Keystone, and SCM keys are
327 # never placed into the app mode loader.
328 'postbuild_name': 'Tweak Info.plist',
329 'action': ['<(tweak_info_plist_path)',
335 }, # target app_mode_app
337 # Convenience target to build a disk image.
338 'target_name': 'build_app_dmg',
339 # Don't place this in the 'all' list; most won't want it.
340 # In GYP, booleans are 0/1, not True/False.
341 'suppress_wildcard': 1,
347 'build_app_dmg_script_path': 'tools/build/mac/build_app_dmg',
348 'pkg_dmg_script_path': 'installer/mac/pkg-dmg',
351 # This duplicates the output path from build_app_dmg.
352 ['branding=="Chrome"', {
353 'dmg_name': 'GoogleChrome.dmg',
354 }, { # else: branding!="Chrome"
355 'dmg_name': 'Chromium.dmg',
362 '<(build_app_dmg_script_path)',
363 '<(pkg_dmg_script_path)',
364 '<(PRODUCT_DIR)/<(mac_product_name).app',
367 '<(PRODUCT_DIR)/<(dmg_name)',
369 'action_name': 'build_app_dmg',
370 'action': ['<(build_app_dmg_script_path)', '<@(branding)'],
375 'target_name': 'infoplist_strings_tool',
376 'type': 'executable',
377 'variables': { 'enable_wexit_time_destructors': 1, },
379 'chrome_resources.gyp:chrome_strings',
380 '../base/base.gyp:base',
381 '../ui/base/ui_base.gyp:ui_base',
382 '../ui/gfx/gfx.gyp:gfx',
383 '../ui/gfx/gfx.gyp:gfx_geometry',
389 'tools/mac_helpers/infoplist_strings_util.mm',
397 'target_name': 'linux_symbols',
400 ['linux_dump_symbols==1', {
403 'action_name': 'dump_symbols',
405 '<(DEPTH)/build/linux/dump_app_syms',
406 '<(PRODUCT_DIR)/dump_syms',
407 '<(PRODUCT_DIR)/chrome',
410 '<(PRODUCT_DIR)/chrome.breakpad.<(target_arch)',
412 'action': ['<(DEPTH)/build/linux/dump_app_syms',
413 '<(PRODUCT_DIR)/dump_syms',
414 '<(linux_strip_binary)',
415 '<(PRODUCT_DIR)/chrome',
417 'message': 'Dumping breakpad symbols to <(_outputs)',
418 'process_outputs_as_sources': 1,
423 '../breakpad/breakpad.gyp:dump_syms',
433 # For historical reasons, chrome/chrome.sln has been the entry point
434 # for new Chrome developers. To assist development, include several
435 # core unittests that are otherwise only accessible side-by-side with
436 # chrome via all/all.sln.
437 'target_name': 'test_targets',
440 '../base/base.gyp:base_unittests',
441 '../content/content_shell_and_tests.gyp:content_browsertests',
442 '../content/content_shell_and_tests.gyp:content_shell',
443 '../content/content_shell_and_tests.gyp:content_unittests',
444 '../net/net.gyp:net_unittests',
445 '../ui/ui_unittests.gyp:ui_unittests',
449 'target_name': 'chrome_version_resources',
452 ['branding == "Chrome"', {
454 'branding_path': 'app/theme/google_chrome/BRANDING',
456 }, { # else branding!="Chrome"
458 'branding_path': 'app/theme/chromium/BRANDING',
463 'output_dir': 'chrome_version',
464 'template_input_path': 'app/chrome_version.rc.version',
466 'direct_dependent_settings': {
468 '<(SHARED_INTERMEDIATE_DIR)/<(output_dir)',
472 'app/chrome_exe.ver',
473 'app/chrome_dll.ver',
474 'app/nacl64_exe.ver',
478 'version_resource_rules.gypi',
482 'target_name': 'chrome_version_header',
484 'hard_dependency': 1,
487 'action_name': 'version_header',
490 '<(DEPTH)/build/util/LASTCHANGE',
493 ['branding == "Chrome"', {
495 'branding_path': 'app/theme/google_chrome/BRANDING',
497 }, { # else branding!="Chrome"
499 'branding_path': 'app/theme/chromium/BRANDING',
506 '<(lastchange_path)',
510 '<(SHARED_INTERMEDIATE_DIR)/version.h',
514 '<(version_py_path)',
515 '-f', '<(version_path)',
516 '-f', '<(branding_path)',
517 '-f', '<(lastchange_path)',
521 'message': 'Generating version header file: <@(_outputs)',
526 'target_name': 'crash_service',
527 'type': 'executable',
530 '../base/base.gyp:base',
531 '../chrome/common_constants.gyp:common_constants',
532 '../components/components.gyp:breakpad_crash_service',
538 'tools/crash_service/main.cc',
542 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
547 'target_name': 'sb_sigutil',
548 'type': 'executable',
550 '../base/base.gyp:base',
551 'safe_browsing_proto',
554 'browser/safe_browsing/binary_feature_extractor.h',
555 'browser/safe_browsing/binary_feature_extractor_win.cc',
556 'browser/safe_browsing/pe_image_reader_win.cc',
557 'browser/safe_browsing/pe_image_reader_win.h',
558 'tools/safe_browsing/sb_sigutil.cc',
563 'chrome_process_finder.gypi',
567 ['OS=="win" and target_arch=="ia32"',
570 'target_name': 'chrome_user32_delay_imports',
573 'lib_dir': '<(INTERMEDIATE_DIR)',
576 'chrome.user32.delay.imports'
579 '../build/win/importlibs/create_import_lib.gypi',
581 'direct_dependent_settings': {
584 'AdditionalLibraryDirectories': ['<(lib_dir)', ],
585 'AdditionalDependencies': ['chrome.user32.delay.lib', ],
591 'target_name': 'crash_service_win64',
592 'type': 'executable',
593 'product_name': 'crash_service64',
595 'installer_util_nacl_win64',
596 '../base/base.gyp:base_static_win64',
597 '../chrome/common_constants.gyp:common_constants_win64',
598 '../components/components.gyp:breakpad_crash_service_win64',
604 'tools/crash_service/main.cc',
605 '../content/public/common/content_switches.cc',
608 'COMPILE_CONTENT_STATICALLY',
612 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
617 'msvs_target_platform': 'x64',
622 ], # OS=="win" and target_arch=="ia32"
624 'includes': [ 'chrome_browser_chromeos.gypi' ],
630 'target_name': 'chrome_java',
633 'activity_type_ids_java',
634 'app_banner_metrics_ids_java',
635 'chrome_resources.gyp:chrome_strings',
636 'chrome_strings_grd',
637 'profile_sync_service_model_type_selection_java',
639 'toolbar_model_security_levels_java',
640 'tab_load_status_java',
641 '../base/base.gyp:base',
642 '../components/components.gyp:autofill_java',
643 '../components/components.gyp:dom_distiller_core_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_printing==1', {
690 # GN version: //chrome/service
691 'target_name': 'service',
692 'type': 'static_library',
693 'variables': { 'enable_wexit_time_destructors': 1, },
695 'chrome_resources.gyp:chrome_strings',
698 '../base/base.gyp:base',
699 '../components/components.gyp:cloud_devices_common',
700 '../google_apis/google_apis.gyp:google_apis',
701 '../jingle/jingle.gyp:notifier',
702 '../net/net.gyp:net',
703 '../printing/printing.gyp:printing',
704 '../skia/skia.gyp:skia',
705 '../third_party/libjingle/libjingle.gyp:libjingle',
708 # Note: sources list duplicated in GN build.
709 'service/cloud_print/cdd_conversion_win.cc',
710 'service/cloud_print/cdd_conversion_win.h',
711 'service/cloud_print/cloud_print_auth.cc',
712 'service/cloud_print/cloud_print_auth.h',
713 'service/cloud_print/cloud_print_connector.cc',
714 'service/cloud_print/cloud_print_connector.h',
715 'service/cloud_print/cloud_print_proxy.cc',
716 'service/cloud_print/cloud_print_proxy.h',
717 'service/cloud_print/cloud_print_proxy_backend.cc',
718 'service/cloud_print/cloud_print_proxy_backend.h',
719 'service/cloud_print/cloud_print_service_helpers.cc',
720 'service/cloud_print/cloud_print_service_helpers.h',
721 'service/cloud_print/cloud_print_token_store.cc',
722 'service/cloud_print/cloud_print_token_store.h',
723 'service/cloud_print/cloud_print_url_fetcher.cc',
724 'service/cloud_print/cloud_print_url_fetcher.h',
725 'service/cloud_print/cloud_print_wipeout.cc',
726 'service/cloud_print/cloud_print_wipeout.h',
727 'service/cloud_print/connector_settings.cc',
728 'service/cloud_print/connector_settings.h',
729 'service/cloud_print/job_status_updater.cc',
730 'service/cloud_print/job_status_updater.h',
731 'service/cloud_print/print_system.cc',
732 'service/cloud_print/print_system.h',
733 'service/cloud_print/print_system_win.cc',
734 'service/cloud_print/printer_job_handler.cc',
735 'service/cloud_print/printer_job_handler.h',
736 'service/cloud_print/printer_job_queue_handler.cc',
737 'service/cloud_print/printer_job_queue_handler.h',
738 'service/net/service_url_request_context_getter.cc',
739 'service/net/service_url_request_context_getter.h',
740 'service/service_ipc_server.cc',
741 'service/service_ipc_server.h',
742 'service/service_main.cc',
743 'service/service_process.cc',
744 'service/service_process.h',
745 'service/service_process_prefs.cc',
746 'service/service_process_prefs.h',
747 'service/service_utility_process_host.cc',
748 'service/service_utility_process_host.h',
756 '../printing/printing.gyp:cups',
759 'service/cloud_print/print_system_cups.cc',
762 ['OS!="win" and use_cups!=1', {
764 'service/cloud_print/print_system_dummy.cc',