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 '../apps/app_shim/app_shim.gypi',
142 'target_name': 'helper_app',
143 'type': 'executable',
144 'variables': { 'enable_wexit_time_destructors': 1, },
145 'product_name': '<(mac_product_name) Helper',
149 'infoplist_strings_tool',
152 # chrome_exe_main_mac.cc's main() is the entry point for
153 # the "chrome" (browser app) target. All it does is jump
154 # to chrome_dll's ChromeMain. This is appropriate for
155 # helper processes too, because the logic to discriminate
156 # between process types at run time is actually directed
157 # by the --type command line argument processed by
158 # ChromeMain. Sharing chrome_exe_main_mac.cc with the
159 # browser app will suffice for now.
160 'app/chrome_exe_main_mac.cc',
161 'app/helper-Info.plist',
163 # TODO(mark): Come up with a fancier way to do this. It should only
164 # be necessary to list helper-Info.plist once, not the three times it
166 'mac_bundle_resources!': [
167 'app/helper-Info.plist',
169 # TODO(mark): For now, don't put any resources into this app. Its
170 # resources directory will be a symbolic link to the browser app's
171 # resources directory.
172 'mac_bundle_resources/': [
176 'CHROMIUM_BUNDLE_ID': '<(mac_bundle_id)',
177 'CHROMIUM_SHORT_NAME': '<(branding)',
178 'CHROMIUM_STRIP_SAVE_FILE': 'app/app.saves',
179 'INFOPLIST_FILE': 'app/helper-Info.plist',
183 # The helper doesn't have real localizations, it just has
184 # empty .lproj directories, which is enough to convince Cocoa
185 # that anything running out of the helper .app supports those
187 'postbuild_name': 'Make Empty Localizations',
190 '>!@(<(apply_locales_cmd) -d ZZLOCALE.lproj <(locales))',
194 'tools/build/mac/make_locale_dirs.sh',
199 # The framework (chrome_dll) defines its load-time path
200 # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
201 # (chrome). A different relative path needs to be used in
203 'postbuild_name': 'Fix Framework Link',
207 '@executable_path/../Versions/<(version_full)/<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
208 '@executable_path/../../../<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
209 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
213 # Modify the Info.plist as needed. The script explains why this
214 # is needed. This is also done in the chrome and chrome_dll
215 # targets. In this case, --breakpad=0, --keystone=0, and --scm=0
216 # are used because Breakpad, Keystone, and SCM keys are
217 # never placed into the helper.
218 'postbuild_name': 'Tweak Info.plist',
219 'action': ['<(tweak_info_plist_path)',
225 # Make sure there isn't any Objective-C in the helper app's
227 'postbuild_name': 'Verify No Objective-C',
229 '../build/mac/verify_no_objc.sh',
234 ['mac_breakpad==1', {
236 # A real .dSYM is needed for dump_syms to operate on.
240 # With mac_real_dsym set, strip_from_xcode won't be used.
241 # Specify CHROMIUM_STRIP_SAVE_FILE directly to Xcode.
242 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
247 # Override the outer definition of CHROMIUM_STRIP_SAVE_FILE.
248 'CHROMIUM_STRIP_SAVE_FILE': 'app/app_asan.saves',
251 ['component=="shared_library"', {
253 'LD_RUNPATH_SEARCH_PATHS': [
254 # Get back from Chromium.app/Contents/Versions/V/
255 # Helper.app/Contents/MacOS
256 '@loader_path/../../../../../../..',
261 }, # target helper_app
263 # A library containing the actual code for the app mode app, shared
265 'target_name': 'app_mode_app_support',
266 'type': 'static_library',
267 'variables': { 'enable_wexit_time_destructors': 1, },
268 'product_name': 'app_mode_app_support',
270 '../base/base.gyp:base',
271 'common_constants.gyp:common_constants',
274 'common/mac/app_mode_chrome_locator.h',
275 'common/mac/app_mode_chrome_locator.mm',
276 'common/mac/app_mode_common.h',
277 'common/mac/app_mode_common.mm',
282 }, # target app_mode_app_support
284 # This produces the template for app mode loader bundles. It's a
285 # template in the sense that parts of it need to be "filled in" by
286 # Chrome before it can be executed.
287 'target_name': 'app_mode_app',
288 'type': 'executable',
291 'enable_wexit_time_destructors': 1,
294 'product_name': 'app_mode_loader',
296 'app_mode_app_support',
297 'infoplist_strings_tool',
300 'app/app_mode_loader_mac.mm',
301 'app/app_mode-Info.plist',
308 '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
309 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
312 'mac_bundle_resources!': [
313 'app/app_mode-Info.plist',
315 'mac_bundle_resources/': [
319 'INFOPLIST_FILE': 'app/app_mode-Info.plist',
320 'APP_MODE_APP_BUNDLE_ID': '<(mac_bundle_id).app.@APP_MODE_SHORTCUT_ID@',
324 # Modify the Info.plist as needed. The script explains why this
325 # is needed. This is also done in the chrome and chrome_dll
326 # targets. In this case, --breakpad=0, --keystone=0, and --scm=0
327 # are used because Breakpad, Keystone, and SCM keys are
328 # never placed into the app mode loader.
329 'postbuild_name': 'Tweak Info.plist',
330 'action': ['<(tweak_info_plist_path)',
336 }, # target app_mode_app
338 # Convenience target to build a disk image.
339 'target_name': 'build_app_dmg',
340 # Don't place this in the 'all' list; most won't want it.
341 # In GYP, booleans are 0/1, not True/False.
342 'suppress_wildcard': 1,
348 'build_app_dmg_script_path': 'tools/build/mac/build_app_dmg',
349 'pkg_dmg_script_path': 'installer/mac/pkg-dmg',
352 # This duplicates the output path from build_app_dmg.
353 ['branding=="Chrome"', {
354 'dmg_name': 'GoogleChrome.dmg',
355 }, { # else: branding!="Chrome"
356 'dmg_name': 'Chromium.dmg',
363 '<(build_app_dmg_script_path)',
364 '<(pkg_dmg_script_path)',
365 '<(PRODUCT_DIR)/<(mac_product_name).app',
368 '<(PRODUCT_DIR)/<(dmg_name)',
370 'action_name': 'build_app_dmg',
371 'action': ['<(build_app_dmg_script_path)', '<@(branding)'],
376 'target_name': 'infoplist_strings_tool',
377 'type': 'executable',
378 'variables': { 'enable_wexit_time_destructors': 1, },
380 'chrome_resources.gyp:chrome_strings',
381 '../base/base.gyp:base',
382 '../ui/base/ui_base.gyp:ui_base',
383 '../ui/gfx/gfx.gyp:gfx',
384 '../ui/gfx/gfx.gyp:gfx_geometry',
390 'tools/mac_helpers/infoplist_strings_util.mm',
398 'target_name': 'linux_symbols',
401 ['linux_dump_symbols==1', {
404 'action_name': 'dump_symbols',
406 '<(DEPTH)/build/linux/dump_app_syms',
407 '<(PRODUCT_DIR)/dump_syms',
408 '<(PRODUCT_DIR)/chrome',
411 '<(PRODUCT_DIR)/chrome.breakpad.<(target_arch)',
413 'action': ['<(DEPTH)/build/linux/dump_app_syms',
414 '<(PRODUCT_DIR)/dump_syms',
415 '<(linux_strip_binary)',
416 '<(PRODUCT_DIR)/chrome',
418 'message': 'Dumping breakpad symbols to <(_outputs)',
419 'process_outputs_as_sources': 1,
424 '../breakpad/breakpad.gyp:dump_syms',
434 # For historical reasons, chrome/chrome.sln has been the entry point
435 # for new Chrome developers. To assist development, include several
436 # core unittests that are otherwise only accessible side-by-side with
437 # chrome via all/all.sln.
438 'target_name': 'test_targets',
441 '../base/base.gyp:base_unittests',
442 '../content/content_shell_and_tests.gyp:content_browsertests',
443 '../content/content_shell_and_tests.gyp:content_shell',
444 '../content/content_shell_and_tests.gyp:content_unittests',
445 '../net/net.gyp:net_unittests',
446 '../ui/ui_unittests.gyp:ui_unittests',
450 'target_name': 'chrome_version_resources',
453 ['branding == "Chrome"', {
455 'branding_path': 'app/theme/google_chrome/BRANDING',
457 }, { # else branding!="Chrome"
459 'branding_path': 'app/theme/chromium/BRANDING',
464 'output_dir': 'chrome_version',
465 'template_input_path': 'app/chrome_version.rc.version',
467 'direct_dependent_settings': {
469 '<(SHARED_INTERMEDIATE_DIR)/<(output_dir)',
473 'app/chrome_exe.ver',
474 'app/chrome_dll.ver',
475 'app/nacl64_exe.ver',
479 'version_resource_rules.gypi',
483 # GN version: //chrome:version_header
484 'target_name': 'chrome_version_header',
486 'hard_dependency': 1,
489 'action_name': 'version_header',
492 '<(DEPTH)/build/util/LASTCHANGE',
495 ['branding == "Chrome"', {
497 'branding_path': 'app/theme/google_chrome/BRANDING',
499 }, { # else branding!="Chrome"
501 'branding_path': 'app/theme/chromium/BRANDING',
508 '<(lastchange_path)',
512 '<(SHARED_INTERMEDIATE_DIR)/version.h',
516 '<(version_py_path)',
517 '-f', '<(version_path)',
518 '-f', '<(branding_path)',
519 '-f', '<(lastchange_path)',
523 'message': 'Generating version header file: <@(_outputs)',
528 'target_name': 'crash_service',
529 'type': 'executable',
532 '../base/base.gyp:base',
533 '../chrome/common_constants.gyp:common_constants',
534 '../components/components.gyp:breakpad_crash_service',
540 'tools/crash_service/main.cc',
544 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
549 'target_name': 'sb_sigutil',
550 'type': 'executable',
552 '../base/base.gyp:base',
553 'safe_browsing_proto',
556 'browser/safe_browsing/binary_feature_extractor.h',
557 'browser/safe_browsing/binary_feature_extractor_win.cc',
558 'browser/safe_browsing/pe_image_reader_win.cc',
559 'browser/safe_browsing/pe_image_reader_win.h',
560 'tools/safe_browsing/sb_sigutil.cc',
565 'chrome_process_finder.gypi',
569 ['OS=="win" and target_arch=="ia32"',
572 'target_name': 'chrome_user32_delay_imports',
575 'lib_dir': '<(INTERMEDIATE_DIR)',
578 'chrome.user32.delay.imports'
581 '../build/win/importlibs/create_import_lib.gypi',
583 'direct_dependent_settings': {
586 'AdditionalLibraryDirectories': ['<(lib_dir)', ],
587 'AdditionalDependencies': ['chrome.user32.delay.lib', ],
593 'target_name': 'crash_service_win64',
594 'type': 'executable',
595 'product_name': 'crash_service64',
597 'installer_util_nacl_win64',
598 '../base/base.gyp:base_static_win64',
599 '../chrome/common_constants.gyp:common_constants_win64',
600 '../components/components.gyp:breakpad_crash_service_win64',
606 'tools/crash_service/main.cc',
607 '../content/public/common/content_switches.cc',
610 'COMPILE_CONTENT_STATICALLY',
614 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
619 'msvs_target_platform': 'x64',
624 ], # OS=="win" and target_arch=="ia32"
626 'includes': [ 'chrome_browser_chromeos.gypi' ],
632 'target_name': 'chrome_java',
635 'activity_type_ids_java',
636 'app_banner_metrics_ids_java',
637 'chrome_resources.gyp:chrome_strings',
638 'chrome_strings_grd',
639 'profile_sync_service_model_type_selection_java',
641 'toolbar_model_security_levels_java',
642 'tab_load_status_java',
643 '../base/base.gyp:base',
644 '../components/components.gyp:bookmarks_java',
645 '../components/components.gyp:dom_distiller_core_java',
646 '../components/components.gyp:enhanced_bookmarks_java',
647 '../components/components.gyp:gcm_driver_java',
648 '../components/components.gyp:navigation_interception_java',
649 '../components/components.gyp:sessions',
650 '../components/components.gyp:variations_java',
651 '../components/components.gyp:web_contents_delegate_android_java',
652 '../content/content.gyp:content_java',
653 '../printing/printing.gyp:printing_java',
654 '../sync/sync.gyp:sync_java',
655 '../third_party/android_tools/android_tools.gyp:android_support_v7_appcompat_javalib',
656 '../third_party/guava/guava.gyp:guava_javalib',
657 '../ui/android/ui_android.gyp:ui_java',
660 'java_in_dir': '../chrome/android/java',
661 'has_java_resources': 1,
662 'R_package': 'org.chromium.chrome',
663 'R_package_relpath': 'org/chromium/chrome',
664 # Include xml string files generated from generated_resources.grd
665 'res_extra_dirs': ['<(SHARED_INTERMEDIATE_DIR)/chrome/java/res'],
666 'res_extra_files': ['<!@pymod_do_main(grit_info <@(grit_defines) --outputs "<(SHARED_INTERMEDIATE_DIR)/chrome" app/generated_resources.grd)'],
669 '../build/java.gypi',
673 'target_name': 'chrome_strings_grd',
676 'grd_file': '../chrome/android/java/strings/android_chrome_strings.grd',
679 '../build/java_strings_grd.gypi',
684 'chrome_android.gypi',
687 ['configuration_policy==1 and OS!="android" and OS!="ios"', {
688 'includes': [ 'policy.gypi', ],
690 ['enable_extensions==1', {
692 'chrome_browser_extensions.gypi',
695 ['enable_printing==1', {
698 # GN version: //chrome/service
699 'target_name': 'service',
700 'type': 'static_library',
701 'variables': { 'enable_wexit_time_destructors': 1, },
703 'chrome_resources.gyp:chrome_strings',
706 '../base/base.gyp:base',
707 '../components/components.gyp:cloud_devices_common',
708 '../google_apis/google_apis.gyp:google_apis',
709 '../jingle/jingle.gyp:notifier',
710 '../net/net.gyp:net',
711 '../printing/printing.gyp:printing',
712 '../skia/skia.gyp:skia',
713 '../third_party/libjingle/libjingle.gyp:libjingle',
716 # Note: sources list duplicated in GN build.
717 'service/cloud_print/cdd_conversion_win.cc',
718 'service/cloud_print/cdd_conversion_win.h',
719 'service/cloud_print/cloud_print_auth.cc',
720 'service/cloud_print/cloud_print_auth.h',
721 'service/cloud_print/cloud_print_connector.cc',
722 'service/cloud_print/cloud_print_connector.h',
723 'service/cloud_print/cloud_print_proxy.cc',
724 'service/cloud_print/cloud_print_proxy.h',
725 'service/cloud_print/cloud_print_proxy_backend.cc',
726 'service/cloud_print/cloud_print_proxy_backend.h',
727 'service/cloud_print/cloud_print_service_helpers.cc',
728 'service/cloud_print/cloud_print_service_helpers.h',
729 'service/cloud_print/cloud_print_token_store.cc',
730 'service/cloud_print/cloud_print_token_store.h',
731 'service/cloud_print/cloud_print_url_fetcher.cc',
732 'service/cloud_print/cloud_print_url_fetcher.h',
733 'service/cloud_print/cloud_print_wipeout.cc',
734 'service/cloud_print/cloud_print_wipeout.h',
735 'service/cloud_print/connector_settings.cc',
736 'service/cloud_print/connector_settings.h',
737 'service/cloud_print/job_status_updater.cc',
738 'service/cloud_print/job_status_updater.h',
739 'service/cloud_print/print_system.cc',
740 'service/cloud_print/print_system.h',
741 'service/cloud_print/print_system_win.cc',
742 'service/cloud_print/printer_job_handler.cc',
743 'service/cloud_print/printer_job_handler.h',
744 'service/cloud_print/printer_job_queue_handler.cc',
745 'service/cloud_print/printer_job_queue_handler.h',
746 'service/net/service_url_request_context_getter.cc',
747 'service/net/service_url_request_context_getter.h',
748 'service/service_ipc_server.cc',
749 'service/service_ipc_server.h',
750 'service/service_main.cc',
751 'service/service_process.cc',
752 'service/service_process.h',
753 'service/service_process_prefs.cc',
754 'service/service_process_prefs.h',
755 'service/service_utility_process_host.cc',
756 'service/service_utility_process_host.h',
764 '../printing/printing.gyp:cups',
767 'service/cloud_print/print_system_cups.cc',
770 ['OS!="win" and use_cups!=1', {
772 'service/cloud_print/print_system_dummy.cc',