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 [ 'cld_version==0 or cld_version==2', {
44 'chromium_child_dependencies': [
45 # Use whatever CLD2 data access mode that the application
47 '<(DEPTH)/third_party/cld_2/cld_2.gyp:cld2_platform_impl', ],
49 ['enable_plugins==1 and disable_nacl==0', {
50 'chromium_child_dependencies': [
51 '<(DEPTH)/components/nacl/renderer/plugin/plugin.gyp:nacl_trusted_plugin',
55 'chromium_child_dependencies': [
56 '../remoting/remoting.gyp:remoting_client_plugin',
61 ['enable_basic_printing==1 or enable_print_preview==1', {
62 'chromium_browser_dependencies': [
63 '../printing/printing.gyp:printing',
66 ['enable_print_preview==1', {
67 'chromium_browser_dependencies': [
72 'platform_locale_settings_grd':
73 'app/resources/locale_settings_win.grd',
79 ['branding=="Chrome"', {
80 'platform_locale_settings_grd':
81 'app/resources/locale_settings_google_chromeos.grd',
82 }, { # branding!=Chrome
83 'platform_locale_settings_grd':
84 'app/resources/locale_settings_chromiumos.grd',
88 'platform_locale_settings_grd':
89 'app/resources/locale_settings_linux.grd',
93 ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "linux"', {
94 'platform_locale_settings_grd':
95 'app/resources/locale_settings_linux.grd',
98 'tweak_info_plist_path': '../build/mac/tweak_info_plist.py',
99 'platform_locale_settings_grd':
100 'app/resources/locale_settings_mac.grd',
105 # Place some targets in gypi files to reduce contention on this file.
106 # By using an include, we keep everything in a single xcodeproj file.
107 # Note on Win64 targets: targets that end with win64 be used
108 # on 64-bit Windows only. Targets that end with nacl_win64 should be used
109 # by Native Client only.
110 # NOTE: Most new includes should go in the OS!="ios" condition below.
111 '../build/chrome_settings.gypi',
112 '../build/util/version.gypi',
113 '../build/win_precompile.gypi',
114 'chrome_browser.gypi',
115 'chrome_browser_ui.gypi',
116 'chrome_common.gypi',
117 'chrome_installer_util.gypi',
118 '../components/nacl/nacl_defines.gypi',
124 'app_installer/app_installer.gypi',
125 'chrome_debugger.gypi',
128 'chrome_installer.gypi',
129 'chrome_plugin.gypi',
130 'chrome_renderer.gypi',
132 'chrome_tests_unit.gypi',
133 'chrome_utility.gypi',
134 'policy_templates.gypi',
138 'target_name': 'default_extensions',
144 'destination': '<(PRODUCT_DIR)/extensions',
146 'browser/extensions/default_extensions/external_extensions.json'
157 'app_shim/app_shim.gypi',
158 'browser/apps/app_shim/browser_app_shim.gypi',
162 'target_name': 'helper_app',
163 'type': 'executable',
164 'variables': { 'enable_wexit_time_destructors': 1, },
165 'product_name': '<(mac_product_name) Helper',
169 'infoplist_strings_tool',
172 # chrome_exe_main_mac.cc's main() is the entry point for
173 # the "chrome" (browser app) target. All it does is jump
174 # to chrome_dll's ChromeMain. This is appropriate for
175 # helper processes too, because the logic to discriminate
176 # between process types at run time is actually directed
177 # by the --type command line argument processed by
178 # ChromeMain. Sharing chrome_exe_main_mac.cc with the
179 # browser app will suffice for now.
180 'app/chrome_exe_main_mac.cc',
181 'app/helper-Info.plist',
183 # TODO(mark): Come up with a fancier way to do this. It should only
184 # be necessary to list helper-Info.plist once, not the three times it
186 'mac_bundle_resources!': [
187 'app/helper-Info.plist',
189 # TODO(mark): For now, don't put any resources into this app. Its
190 # resources directory will be a symbolic link to the browser app's
191 # resources directory.
192 'mac_bundle_resources/': [
196 'CHROMIUM_BUNDLE_ID': '<(mac_bundle_id)',
197 'CHROMIUM_SHORT_NAME': '<(branding)',
198 'CHROMIUM_STRIP_SAVE_FILE': 'app/app.saves',
199 'INFOPLIST_FILE': 'app/helper-Info.plist',
203 # The helper doesn't have real localizations, it just has
204 # empty .lproj directories, which is enough to convince Cocoa
205 # that anything running out of the helper .app supports those
207 'postbuild_name': 'Make Empty Localizations',
210 '>!@(<(apply_locales_cmd) -d ZZLOCALE.lproj <(locales))',
214 'tools/build/mac/make_locale_dirs.sh',
219 # The framework (chrome_dll) defines its load-time path
220 # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
221 # (chrome). A different relative path needs to be used in
223 'postbuild_name': 'Fix Framework Link',
227 '@executable_path/../Versions/<(version_full)/<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
228 '@executable_path/../../../<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
229 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
233 # Modify the Info.plist as needed. The script explains why this
234 # is needed. This is also done in the chrome and chrome_dll
235 # targets. In this case, --breakpad=0, --keystone=0, and --scm=0
236 # are used because Breakpad, Keystone, and SCM keys are
237 # never placed into the helper.
238 'postbuild_name': 'Tweak Info.plist',
239 'action': ['<(tweak_info_plist_path)',
245 # Make sure there isn't any Objective-C in the helper app's
247 'postbuild_name': 'Verify No Objective-C',
249 '../build/mac/verify_no_objc.sh',
254 ['mac_breakpad==1', {
256 # A real .dSYM is needed for dump_syms to operate on.
260 # With mac_real_dsym set, strip_from_xcode won't be used.
261 # Specify CHROMIUM_STRIP_SAVE_FILE directly to Xcode.
262 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
265 ['component=="shared_library"', {
267 'LD_RUNPATH_SEARCH_PATHS': [
268 # Get back from Chromium.app/Contents/Versions/V/
269 # Helper.app/Contents/MacOS
270 '@loader_path/../../../../../../..',
275 }, # target helper_app
277 # A library containing the actual code for the app mode app, shared
279 'target_name': 'app_mode_app_support',
280 'type': 'static_library',
281 'variables': { 'enable_wexit_time_destructors': 1, },
282 'product_name': 'app_mode_app_support',
284 '../base/base.gyp:base',
285 'common_constants.gyp:common_constants',
288 'common/mac/app_mode_chrome_locator.h',
289 'common/mac/app_mode_chrome_locator.mm',
290 'common/mac/app_mode_common.h',
291 'common/mac/app_mode_common.mm',
296 }, # target app_mode_app_support
298 # Convenience target to build a disk image.
299 'target_name': 'build_app_dmg',
300 # Don't place this in the 'all' list; most won't want it.
301 # In GYP, booleans are 0/1, not True/False.
302 'suppress_wildcard': 1,
308 'build_app_dmg_script_path': 'tools/build/mac/build_app_dmg',
309 'pkg_dmg_script_path': 'installer/mac/pkg-dmg',
312 # This duplicates the output path from build_app_dmg.
313 ['branding=="Chrome"', {
314 'dmg_name': 'GoogleChrome.dmg',
315 }, { # else: branding!="Chrome"
316 'dmg_name': 'Chromium.dmg',
323 '<(build_app_dmg_script_path)',
324 '<(pkg_dmg_script_path)',
325 '<(PRODUCT_DIR)/<(mac_product_name).app',
328 '<(PRODUCT_DIR)/<(dmg_name)',
330 'action_name': 'build_app_dmg',
331 'action': ['<(build_app_dmg_script_path)', '<@(branding)'],
336 'target_name': 'infoplist_strings_tool',
337 'type': 'executable',
338 'variables': { 'enable_wexit_time_destructors': 1, },
340 'chrome_resources.gyp:chrome_strings',
341 '../base/base.gyp:base',
342 '../ui/base/ui_base.gyp:ui_base',
343 '../ui/gfx/gfx.gyp:gfx',
344 '../ui/gfx/gfx.gyp:gfx_geometry',
350 'tools/mac_helpers/infoplist_strings_util.mm',
358 'target_name': 'linux_symbols',
361 ['linux_dump_symbols==1', {
364 'action_name': 'dump_symbols',
366 '<(DEPTH)/build/linux/dump_app_syms',
367 '<(PRODUCT_DIR)/dump_syms',
368 '<(PRODUCT_DIR)/chrome',
371 '<(PRODUCT_DIR)/chrome.breakpad.<(target_arch)',
373 'action': ['<(DEPTH)/build/linux/dump_app_syms',
374 '<(PRODUCT_DIR)/dump_syms',
375 '<(linux_strip_binary)',
376 '<(PRODUCT_DIR)/chrome',
378 'message': 'Dumping breakpad symbols to <(_outputs)',
379 'process_outputs_as_sources': 1,
384 '../breakpad/breakpad.gyp:dump_syms',
394 # For historical reasons, chrome/chrome.sln has been the entry point
395 # for new Chrome developers. To assist development, include several
396 # core unittests that are otherwise only accessible side-by-side with
397 # chrome via all/all.sln.
398 'target_name': 'test_targets',
401 '../base/base.gyp:base_unittests',
402 '../content/content_shell_and_tests.gyp:content_browsertests',
403 '../content/content_shell_and_tests.gyp:content_shell',
404 '../content/content_shell_and_tests.gyp:content_unittests',
405 '../net/net.gyp:net_unittests',
406 '../ui/base/ui_base_tests.gyp:ui_base_unittests',
410 'target_name': 'chrome_version_resources',
413 ['branding == "Chrome"', {
415 'branding_path': 'app/theme/google_chrome/BRANDING',
417 }, { # else branding!="Chrome"
419 'branding_path': 'app/theme/chromium/BRANDING',
424 'output_dir': 'chrome_version',
425 'template_input_path': 'app/chrome_version.rc.version',
427 'direct_dependent_settings': {
429 '<(SHARED_INTERMEDIATE_DIR)/<(output_dir)',
433 'app/chrome_exe.ver',
434 'app/chrome_dll.ver',
435 'app/nacl64_exe.ver',
439 'version_resource_rules.gypi',
443 # GN version: //chrome:version_header
444 'target_name': 'chrome_version_header',
446 'hard_dependency': 1,
449 'action_name': 'version_header',
452 '<(DEPTH)/build/util/LASTCHANGE',
455 ['branding == "Chrome"', {
457 'branding_path': 'app/theme/google_chrome/BRANDING',
459 }, { # else branding!="Chrome"
461 'branding_path': 'app/theme/chromium/BRANDING',
468 '<(lastchange_path)',
472 '<(SHARED_INTERMEDIATE_DIR)/version.h',
476 '<(version_py_path)',
477 '-f', '<(version_path)',
478 '-f', '<(branding_path)',
479 '-f', '<(lastchange_path)',
483 'message': 'Generating version header file: <@(_outputs)',
488 'target_name': 'crash_service',
489 'type': 'executable',
492 '../base/base.gyp:base',
493 '../chrome/common_constants.gyp:common_constants',
494 '../components/components.gyp:breakpad_crash_service',
500 'tools/crash_service/main.cc',
504 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
509 'target_name': 'sb_sigutil',
510 'type': 'executable',
512 '../base/base.gyp:base',
513 '../crypto/crypto.gyp:crypto',
514 'safe_browsing_proto',
517 'browser/safe_browsing/binary_feature_extractor.cc',
518 'browser/safe_browsing/binary_feature_extractor.h',
519 'browser/safe_browsing/binary_feature_extractor_win.cc',
520 'browser/safe_browsing/pe_image_reader_win.cc',
521 'browser/safe_browsing/pe_image_reader_win.h',
522 'tools/safe_browsing/sb_sigutil.cc',
527 'app_shim/app_shim_win.gypi',
528 'chrome_watcher/chrome_watcher.gypi',
529 'chrome_process_finder.gypi',
533 ['OS=="win" and target_arch=="ia32"',
536 'target_name': 'chrome_user32_delay_imports',
539 'lib_dir': '<(INTERMEDIATE_DIR)',
542 'chrome.user32.delay.imports'
545 '../build/win/importlibs/create_import_lib.gypi',
547 'direct_dependent_settings': {
550 'AdditionalLibraryDirectories': ['<(lib_dir)', ],
551 'AdditionalDependencies': ['chrome.user32.delay.lib', ],
557 'target_name': 'crash_service_win64',
558 'type': 'executable',
559 'product_name': 'crash_service64',
561 'installer_util_nacl_win64',
562 '../base/base.gyp:base_static_win64',
563 '../chrome/common_constants.gyp:common_constants_win64',
564 '../components/components.gyp:breakpad_crash_service_win64',
570 'tools/crash_service/main.cc',
571 '../content/public/common/content_switches.cc',
574 'COMPILE_CONTENT_STATICALLY',
578 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
583 'msvs_target_platform': 'x64',
588 ], # OS=="win" and target_arch=="ia32"
590 'includes': [ 'chrome_browser_chromeos.gypi' ],
596 # GN: //chrome/android:chrome_java
597 'target_name': 'chrome_java',
600 'activity_type_ids_java',
601 'app_banner_metrics_ids_java',
602 'chrome_resources.gyp:chrome_strings',
603 'chrome_strings_grd',
604 'chrome_version_java',
605 'document_tab_model_info_proto_java',
606 'profile_account_management_metrics_java',
607 'content_setting_java',
608 'content_settings_type_java',
609 'page_info_connection_type_java',
610 'profile_sync_service_model_type_selection_java',
612 'toolbar_model_security_levels_java',
613 'tab_load_status_java',
614 '../base/base.gyp:base',
615 '../components/components.gyp:bookmarks_java',
616 '../components/components.gyp:dom_distiller_core_java',
617 '../components/components.gyp:gcm_driver_java',
618 '../components/components.gyp:invalidation_java',
619 '../components/components.gyp:navigation_interception_java',
620 '../components/components.gyp:variations_java',
621 '../components/components.gyp:web_contents_delegate_android_java',
622 '../content/content.gyp:content_java',
623 '../printing/printing.gyp:printing_java',
624 '../sync/sync.gyp:sync_java',
625 '../third_party/android_tools/android_tools.gyp:android_support_v7_appcompat_javalib',
626 '../third_party/android_tools/android_tools.gyp:android_support_v13_javalib',
627 '../third_party/libaddressinput/libaddressinput.gyp:android_addressinput_widget',
628 '../ui/android/ui_android.gyp:ui_java',
631 'java_in_dir': '../chrome/android/java',
632 'has_java_resources': 1,
633 'R_package': 'org.chromium.chrome',
634 'R_package_relpath': 'org/chromium/chrome',
635 # Include xml string files generated from generated_resources.grd
636 'res_extra_dirs': ['<(SHARED_INTERMEDIATE_DIR)/chrome/java/res'],
637 'res_extra_files': ['<!@pymod_do_main(grit_info <@(grit_defines) --outputs "<(SHARED_INTERMEDIATE_DIR)/chrome" app/generated_resources.grd)'],
640 '../build/java.gypi',
644 # GN: //chrome/android:chrome_strings_grd
645 'target_name': 'chrome_strings_grd',
648 'grd_file': '../chrome/android/java/strings/android_chrome_strings.grd',
651 '../build/java_strings_grd.gypi',
655 # GN: //chrome:content_setting_javagen
656 'target_name': 'content_setting_java',
659 'source_file': '../components/content_settings/core/common/content_settings.h',
661 'includes': [ '../build/android/java_cpp_enum.gypi' ],
664 # GN: //chrome:content_settings_type_javagen
665 'target_name': 'content_settings_type_java',
668 'source_file': '../components/content_settings/core/common/content_settings_types.h',
670 'includes': [ '../build/android/java_cpp_enum.gypi' ],
673 # GN: //chrome:page_info_connection_type_javagen
674 'target_name': 'page_info_connection_type_java',
677 'source_file': 'browser/ui/android/website_settings_popup_android.h',
679 'includes': [ '../build/android/java_cpp_enum.gypi' ],
683 'chrome_android.gypi',
686 ['configuration_policy==1 and OS!="android" and OS!="ios"', {
687 'includes': [ 'policy.gypi', ],
689 ['enable_extensions==1', {
691 'chrome_browser_extensions.gypi',
694 ['enable_print_preview==1', {
697 # GN version: //chrome/service
698 'target_name': 'service',
699 'type': 'static_library',
700 'variables': { 'enable_wexit_time_destructors': 1, },
702 'chrome_resources.gyp:chrome_strings',
705 '../base/base.gyp:base',
706 '../components/components.gyp:cloud_devices_common',
707 '../google_apis/google_apis.gyp:google_apis',
708 '../jingle/jingle.gyp:notifier',
709 '../net/net.gyp:net',
710 '../printing/printing.gyp:printing',
711 '../skia/skia.gyp:skia',
712 '../third_party/libjingle/libjingle.gyp:libjingle',
715 # Note: sources list duplicated in GN build.
716 'service/cloud_print/cdd_conversion_win.cc',
717 'service/cloud_print/cdd_conversion_win.h',
718 'service/cloud_print/cloud_print_auth.cc',
719 'service/cloud_print/cloud_print_auth.h',
720 'service/cloud_print/cloud_print_connector.cc',
721 'service/cloud_print/cloud_print_connector.h',
722 'service/cloud_print/cloud_print_proxy.cc',
723 'service/cloud_print/cloud_print_proxy.h',
724 'service/cloud_print/cloud_print_proxy_backend.cc',
725 'service/cloud_print/cloud_print_proxy_backend.h',
726 'service/cloud_print/cloud_print_service_helpers.cc',
727 'service/cloud_print/cloud_print_service_helpers.h',
728 'service/cloud_print/cloud_print_token_store.cc',
729 'service/cloud_print/cloud_print_token_store.h',
730 'service/cloud_print/cloud_print_url_fetcher.cc',
731 'service/cloud_print/cloud_print_url_fetcher.h',
732 'service/cloud_print/cloud_print_wipeout.cc',
733 'service/cloud_print/cloud_print_wipeout.h',
734 'service/cloud_print/connector_settings.cc',
735 'service/cloud_print/connector_settings.h',
736 'service/cloud_print/job_status_updater.cc',
737 'service/cloud_print/job_status_updater.h',
738 'service/cloud_print/print_system.cc',
739 'service/cloud_print/print_system.h',
740 'service/cloud_print/print_system_win.cc',
741 'service/cloud_print/printer_job_handler.cc',
742 'service/cloud_print/printer_job_handler.h',
743 'service/cloud_print/printer_job_queue_handler.cc',
744 'service/cloud_print/printer_job_queue_handler.h',
745 'service/net/service_url_request_context_getter.cc',
746 'service/net/service_url_request_context_getter.h',
747 'service/service_ipc_server.cc',
748 'service/service_ipc_server.h',
749 'service/service_main.cc',
750 'service/service_process.cc',
751 'service/service_process.h',
752 'service/service_process_prefs.cc',
753 'service/service_process_prefs.h',
754 'service/service_utility_process_host.cc',
755 'service/service_utility_process_host.h',
763 '../printing/printing.gyp:cups',
766 'service/cloud_print/print_system_cups.cc',
769 ['OS!="win" and use_cups!=1', {
771 'service/cloud_print/print_system_dummy.cc',
776 'service/service_utility_process_host.cc',
777 'service/service_utility_process_host.h',