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_unittests',
397 'target_name': 'chrome_version_resources',
400 ['branding == "Chrome"', {
402 'branding_path': 'app/theme/google_chrome/BRANDING',
404 }, { # else branding!="Chrome"
406 'branding_path': 'app/theme/chromium/BRANDING',
411 'output_dir': 'chrome_version',
412 'template_input_path': 'app/chrome_version.rc.version',
414 'direct_dependent_settings': {
416 '<(SHARED_INTERMEDIATE_DIR)/<(output_dir)',
420 'app/chrome_exe.ver',
421 'app/chrome_dll.ver',
422 'app/nacl64_exe.ver',
426 'version_resource_rules.gypi',
430 # GN version: //chrome:version_header
431 'target_name': 'chrome_version_header',
433 'hard_dependency': 1,
436 'action_name': 'version_header',
439 '<(DEPTH)/build/util/LASTCHANGE',
442 ['branding == "Chrome"', {
444 'branding_path': 'app/theme/google_chrome/BRANDING',
446 }, { # else branding!="Chrome"
448 'branding_path': 'app/theme/chromium/BRANDING',
455 '<(lastchange_path)',
459 '<(SHARED_INTERMEDIATE_DIR)/version.h',
463 '<(version_py_path)',
464 '-f', '<(version_path)',
465 '-f', '<(branding_path)',
466 '-f', '<(lastchange_path)',
470 'message': 'Generating version header file: <@(_outputs)',
475 'target_name': 'crash_service',
476 'type': 'executable',
479 '../base/base.gyp:base',
480 '../chrome/common_constants.gyp:common_constants',
481 '../components/components.gyp:breakpad_crash_service',
487 'tools/crash_service/main.cc',
491 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
496 'target_name': 'sb_sigutil',
497 'type': 'executable',
499 '../base/base.gyp:base',
500 'safe_browsing_proto',
503 'browser/safe_browsing/binary_feature_extractor.h',
504 'browser/safe_browsing/binary_feature_extractor_win.cc',
505 'browser/safe_browsing/pe_image_reader_win.cc',
506 'browser/safe_browsing/pe_image_reader_win.h',
507 'tools/safe_browsing/sb_sigutil.cc',
512 'chrome_process_finder.gypi',
516 ['OS=="win" and target_arch=="ia32"',
519 'target_name': 'chrome_user32_delay_imports',
522 'lib_dir': '<(INTERMEDIATE_DIR)',
525 'chrome.user32.delay.imports'
528 '../build/win/importlibs/create_import_lib.gypi',
530 'direct_dependent_settings': {
533 'AdditionalLibraryDirectories': ['<(lib_dir)', ],
534 'AdditionalDependencies': ['chrome.user32.delay.lib', ],
540 'target_name': 'crash_service_win64',
541 'type': 'executable',
542 'product_name': 'crash_service64',
544 'installer_util_nacl_win64',
545 '../base/base.gyp:base_static_win64',
546 '../chrome/common_constants.gyp:common_constants_win64',
547 '../components/components.gyp:breakpad_crash_service_win64',
553 'tools/crash_service/main.cc',
554 '../content/public/common/content_switches.cc',
557 'COMPILE_CONTENT_STATICALLY',
561 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
566 'msvs_target_platform': 'x64',
571 ], # OS=="win" and target_arch=="ia32"
573 'includes': [ 'chrome_browser_chromeos.gypi' ],
579 'target_name': 'chrome_java',
582 'activity_type_ids_java',
583 'app_banner_metrics_ids_java',
584 'chrome_resources.gyp:chrome_strings',
585 'chrome_strings_grd',
586 'profile_sync_service_model_type_selection_java',
588 'toolbar_model_security_levels_java',
589 'tab_load_status_java',
590 '../base/base.gyp:base',
591 '../components/components.gyp:bookmarks_java',
592 '../components/components.gyp:dom_distiller_core_java',
593 '../components/components.gyp:gcm_driver_java',
594 '../components/components.gyp:navigation_interception_java',
595 '../components/components.gyp:sessions',
596 '../components/components.gyp:variations_java',
597 '../components/components.gyp:web_contents_delegate_android_java',
598 '../content/content.gyp:content_java',
599 '../printing/printing.gyp:printing_java',
600 '../sync/sync.gyp:sync_java',
601 '../third_party/android_tools/android_tools.gyp:android_support_v7_appcompat_javalib',
602 '../third_party/android_tools/android_tools.gyp:android_support_v13_javalib',
603 '../ui/android/ui_android.gyp:ui_java',
606 'java_in_dir': '../chrome/android/java',
607 'has_java_resources': 1,
608 'R_package': 'org.chromium.chrome',
609 'R_package_relpath': 'org/chromium/chrome',
610 # Include xml string files generated from generated_resources.grd
611 'res_extra_dirs': ['<(SHARED_INTERMEDIATE_DIR)/chrome/java/res'],
612 'res_extra_files': ['<!@pymod_do_main(grit_info <@(grit_defines) --outputs "<(SHARED_INTERMEDIATE_DIR)/chrome" app/generated_resources.grd)'],
615 '../build/java.gypi',
619 'target_name': 'chrome_strings_grd',
622 'grd_file': '../chrome/android/java/strings/android_chrome_strings.grd',
625 '../build/java_strings_grd.gypi',
630 'chrome_android.gypi',
633 ['configuration_policy==1 and OS!="android" and OS!="ios"', {
634 'includes': [ 'policy.gypi', ],
636 ['enable_extensions==1', {
638 'chrome_browser_extensions.gypi',
641 ['enable_printing==1', {
644 # GN version: //chrome/service
645 'target_name': 'service',
646 'type': 'static_library',
647 'variables': { 'enable_wexit_time_destructors': 1, },
649 'chrome_resources.gyp:chrome_strings',
652 '../base/base.gyp:base',
653 '../components/components.gyp:cloud_devices_common',
654 '../google_apis/google_apis.gyp:google_apis',
655 '../jingle/jingle.gyp:notifier',
656 '../net/net.gyp:net',
657 '../printing/printing.gyp:printing',
658 '../skia/skia.gyp:skia',
659 '../third_party/libjingle/libjingle.gyp:libjingle',
662 # Note: sources list duplicated in GN build.
663 'service/cloud_print/cdd_conversion_win.cc',
664 'service/cloud_print/cdd_conversion_win.h',
665 'service/cloud_print/cloud_print_auth.cc',
666 'service/cloud_print/cloud_print_auth.h',
667 'service/cloud_print/cloud_print_connector.cc',
668 'service/cloud_print/cloud_print_connector.h',
669 'service/cloud_print/cloud_print_proxy.cc',
670 'service/cloud_print/cloud_print_proxy.h',
671 'service/cloud_print/cloud_print_proxy_backend.cc',
672 'service/cloud_print/cloud_print_proxy_backend.h',
673 'service/cloud_print/cloud_print_service_helpers.cc',
674 'service/cloud_print/cloud_print_service_helpers.h',
675 'service/cloud_print/cloud_print_token_store.cc',
676 'service/cloud_print/cloud_print_token_store.h',
677 'service/cloud_print/cloud_print_url_fetcher.cc',
678 'service/cloud_print/cloud_print_url_fetcher.h',
679 'service/cloud_print/cloud_print_wipeout.cc',
680 'service/cloud_print/cloud_print_wipeout.h',
681 'service/cloud_print/connector_settings.cc',
682 'service/cloud_print/connector_settings.h',
683 'service/cloud_print/job_status_updater.cc',
684 'service/cloud_print/job_status_updater.h',
685 'service/cloud_print/print_system.cc',
686 'service/cloud_print/print_system.h',
687 'service/cloud_print/print_system_win.cc',
688 'service/cloud_print/printer_job_handler.cc',
689 'service/cloud_print/printer_job_handler.h',
690 'service/cloud_print/printer_job_queue_handler.cc',
691 'service/cloud_print/printer_job_queue_handler.h',
692 'service/net/service_url_request_context_getter.cc',
693 'service/net/service_url_request_context_getter.h',
694 'service/service_ipc_server.cc',
695 'service/service_ipc_server.h',
696 'service/service_main.cc',
697 'service/service_process.cc',
698 'service/service_process.h',
699 'service/service_process_prefs.cc',
700 'service/service_process_prefs.h',
701 'service/service_utility_process_host.cc',
702 'service/service_utility_process_host.h',
710 '../printing/printing.gyp:cups',
713 'service/cloud_print/print_system_cups.cc',
716 ['OS!="win" and use_cups!=1', {
718 'service/cloud_print/print_system_dummy.cc',
723 'service/service_utility_process_host.cc',
724 'service/service_utility_process_host.h',