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': [
39 '../content/content.gyp:content_gpu',
40 '../content/content.gyp:content_ppapi_plugin',
41 '../third_party/WebKit/public/blink_devtools.gyp:blink_devtools_frontend_resources',
44 [ 'cld_version==0 or cld_version==2', {
45 'chromium_child_dependencies': [
46 # Use whatever CLD2 data access mode that the application
48 '<(DEPTH)/third_party/cld_2/cld_2.gyp:cld2_platform_impl', ],
50 ['enable_plugins==1 and disable_nacl==0', {
51 'chromium_child_dependencies': [
52 '<(DEPTH)/components/nacl/renderer/plugin/plugin.gyp:nacl_trusted_plugin',
56 'chromium_child_dependencies': [
57 '../remoting/remoting.gyp:remoting_client_plugin',
62 ['enable_basic_printing==1 or enable_print_preview==1', {
63 'chromium_browser_dependencies': [
64 '../printing/printing.gyp:printing',
67 ['enable_print_preview==1', {
68 'chromium_browser_dependencies': [
73 'platform_locale_settings_grd':
74 'app/resources/locale_settings_win.grd',
79 'platform_locale_settings_grd':
80 'app/resources/locale_settings_<(branding_path_component)os.grd',
82 'platform_locale_settings_grd':
83 'app/resources/locale_settings_linux.grd',
87 ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "linux"', {
88 'platform_locale_settings_grd':
89 'app/resources/locale_settings_linux.grd',
92 'tweak_info_plist_path': '../build/mac/tweak_info_plist.py',
93 'platform_locale_settings_grd':
94 'app/resources/locale_settings_mac.grd',
99 # Place some targets in gypi files to reduce contention on this file.
100 # By using an include, we keep everything in a single xcodeproj file.
101 # Note on Win64 targets: targets that end with win64 be used
102 # on 64-bit Windows only. Targets that end with nacl_win64 should be used
103 # by Native Client only.
104 # NOTE: Most new includes should go in the OS!="ios" condition below.
105 '../build/chrome_settings.gypi',
106 '../build/util/version.gypi',
107 '../build/win_precompile.gypi',
108 'chrome_browser.gypi',
109 'chrome_browser_ui.gypi',
110 'chrome_common.gypi',
111 'chrome_installer_util.gypi',
118 'chrome_debugger.gypi',
121 'chrome_installer.gypi',
122 'chrome_plugin.gypi',
123 'chrome_renderer.gypi',
125 'chrome_tests_unit.gypi',
126 'chrome_utility.gypi',
127 'policy_templates.gypi',
131 'target_name': 'default_extensions',
137 'destination': '<(PRODUCT_DIR)/extensions',
139 'browser/extensions/default_extensions/external_extensions.json'
150 'app_shim/app_shim.gypi',
151 'browser/apps/app_shim/browser_app_shim.gypi',
155 'target_name': 'helper_app',
156 'type': 'executable',
157 'variables': { 'enable_wexit_time_destructors': 1, },
158 'product_name': '<(mac_product_name) Helper',
162 'infoplist_strings_tool',
165 # chrome_exe_main_mac.cc's main() is the entry point for
166 # the "chrome" (browser app) target. All it does is jump
167 # to chrome_dll's ChromeMain. This is appropriate for
168 # helper processes too, because the logic to discriminate
169 # between process types at run time is actually directed
170 # by the --type command line argument processed by
171 # ChromeMain. Sharing chrome_exe_main_mac.cc with the
172 # browser app will suffice for now.
173 'app/chrome_exe_main_mac.cc',
174 'app/helper-Info.plist',
176 # TODO(mark): Come up with a fancier way to do this. It should only
177 # be necessary to list helper-Info.plist once, not the three times it
179 'mac_bundle_resources!': [
180 'app/helper-Info.plist',
182 # TODO(mark): For now, don't put any resources into this app. Its
183 # resources directory will be a symbolic link to the browser app's
184 # resources directory.
185 'mac_bundle_resources/': [
189 'CHROMIUM_BUNDLE_ID': '<(mac_bundle_id)',
190 'CHROMIUM_SHORT_NAME': '<(branding)',
191 'CHROMIUM_STRIP_SAVE_FILE': 'app/app.saves',
192 'INFOPLIST_FILE': 'app/helper-Info.plist',
196 # The helper doesn't have real localizations, it just has
197 # empty .lproj directories, which is enough to convince Cocoa
198 # that anything running out of the helper .app supports those
200 'postbuild_name': 'Make Empty Localizations',
203 '>!@(<(apply_locales_cmd) -d ZZLOCALE.lproj <(locales))',
207 'tools/build/mac/make_locale_dirs.sh',
212 # The framework (chrome_dll) defines its load-time path
213 # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
214 # (chrome). A different relative path needs to be used in
216 'postbuild_name': 'Fix Framework Link',
220 '@executable_path/../Versions/<(version_full)/<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
221 '@executable_path/../../../<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
222 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
226 # Modify the Info.plist as needed. The script explains why this
227 # is needed. This is also done in the chrome and chrome_dll
228 # targets. In this case, --breakpad=0, --keystone=0, and --scm=0
229 # are used because Breakpad, Keystone, and SCM keys are
230 # never placed into the helper.
231 'postbuild_name': 'Tweak Info.plist',
232 'action': ['<(tweak_info_plist_path)',
238 # Make sure there isn't any Objective-C in the helper app's
240 'postbuild_name': 'Verify No Objective-C',
242 '../build/mac/verify_no_objc.sh',
247 ['mac_breakpad==1', {
249 # A real .dSYM is needed for dump_syms to operate on.
253 # With mac_real_dsym set, strip_from_xcode won't be used.
254 # Specify CHROMIUM_STRIP_SAVE_FILE directly to Xcode.
255 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
258 ['component=="shared_library"', {
260 'LD_RUNPATH_SEARCH_PATHS': [
261 # Get back from Chromium.app/Contents/Versions/V/
262 # Helper.app/Contents/MacOS
263 '@loader_path/../../../../../../..',
268 }, # target helper_app
270 # A library containing the actual code for the app mode app, shared
272 # GN: //chrome/common:app_mode_app_support
273 'target_name': 'app_mode_app_support',
274 'type': 'static_library',
275 'variables': { 'enable_wexit_time_destructors': 1, },
276 'product_name': 'app_mode_app_support',
278 '../base/base.gyp:base',
279 'common_constants.gyp:common_constants',
282 'common/mac/app_mode_chrome_locator.h',
283 'common/mac/app_mode_chrome_locator.mm',
284 'common/mac/app_mode_common.h',
285 'common/mac/app_mode_common.mm',
290 }, # target app_mode_app_support
292 # Convenience target to build a disk image.
293 'target_name': 'build_app_dmg',
294 # Don't place this in the 'all' list; most won't want it.
295 # In GYP, booleans are 0/1, not True/False.
296 'suppress_wildcard': 1,
302 'build_app_dmg_script_path': 'tools/build/mac/build_app_dmg',
303 'pkg_dmg_script_path': 'installer/mac/pkg-dmg',
306 # This duplicates the output path from build_app_dmg.
307 ['branding=="Chrome"', {
308 'dmg_name': 'GoogleChrome.dmg',
309 }, { # else: branding!="Chrome"
310 'dmg_name': 'Chromium.dmg',
317 '<(build_app_dmg_script_path)',
318 '<(pkg_dmg_script_path)',
319 '<(PRODUCT_DIR)/<(mac_product_name).app',
322 '<(PRODUCT_DIR)/<(dmg_name)',
324 'action_name': 'build_app_dmg',
325 'action': ['<(build_app_dmg_script_path)', '<@(branding)'],
330 'target_name': 'infoplist_strings_tool',
331 'type': 'executable',
332 'variables': { 'enable_wexit_time_destructors': 1, },
334 'chrome_resources.gyp:chrome_strings',
335 '../base/base.gyp:base',
336 '../ui/base/ui_base.gyp:ui_base',
337 '../ui/gfx/gfx.gyp:gfx',
338 '../ui/gfx/gfx.gyp:gfx_geometry',
344 'tools/mac_helpers/infoplist_strings_util.mm',
352 # GN version: //chrome:linux_symbols
353 'target_name': 'linux_symbols',
356 ['linux_dump_symbols==1', {
359 'action_name': 'dump_symbols',
361 '<(DEPTH)/build/linux/dump_app_syms.py',
362 '<(PRODUCT_DIR)/dump_syms',
363 '<(PRODUCT_DIR)/chrome',
366 '<(PRODUCT_DIR)/chrome.breakpad.<(target_arch)',
369 '<(DEPTH)/build/linux/dump_app_syms.py',
370 '<(PRODUCT_DIR)/dump_syms',
371 '<(linux_strip_binary)',
372 '<(PRODUCT_DIR)/chrome',
374 'message': 'Dumping breakpad symbols to <(_outputs)',
375 'process_outputs_as_sources': 1,
380 '../breakpad/breakpad.gyp:dump_syms#host',
390 # For historical reasons, chrome/chrome.sln has been the entry point
391 # for new Chrome developers. To assist development, include several
392 # core unittests that are otherwise only accessible side-by-side with
393 # chrome via all/all.sln.
394 'target_name': 'test_targets',
397 '../base/base.gyp:base_unittests',
398 '../content/content_shell_and_tests.gyp:content_browsertests',
399 '../content/content_shell_and_tests.gyp:content_shell',
400 '../content/content_shell_and_tests.gyp:content_unittests',
401 '../net/net.gyp:net_unittests',
402 '../ui/base/ui_base_tests.gyp:ui_base_unittests',
406 # GN version: //chrome:chrome_version_resources
407 'target_name': 'chrome_version_resources',
410 'output_dir': 'chrome_version',
411 'template_input_path': 'app/chrome_version.rc.version',
412 'branding_path': 'app/theme/<(branding_path_component)/BRANDING',
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',
440 'branding_path': 'app/theme/<(branding_path_component)/BRANDING',
445 '<(lastchange_path)',
449 '<(SHARED_INTERMEDIATE_DIR)/version.h',
453 '<(version_py_path)',
454 '-f', '<(version_path)',
455 '-f', '<(branding_path)',
456 '-f', '<(lastchange_path)',
460 'message': 'Generating version header file: <@(_outputs)',
465 'target_name': 'crash_service',
466 'type': 'executable',
469 '../base/base.gyp:base',
470 '../chrome/common_constants.gyp:common_constants',
471 '../components/components.gyp:breakpad_crash_service',
477 'tools/crash_service/main.cc',
481 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
486 'target_name': 'sb_sigutil',
487 'type': 'executable',
489 '../base/base.gyp:base',
490 '../crypto/crypto.gyp:crypto',
491 'safe_browsing_proto',
494 'common/safe_browsing/binary_feature_extractor.cc',
495 'common/safe_browsing/binary_feature_extractor.h',
496 'common/safe_browsing/binary_feature_extractor_win.cc',
497 'common/safe_browsing/pe_image_reader_win.cc',
498 'common/safe_browsing/pe_image_reader_win.h',
499 'tools/safe_browsing/sb_sigutil.cc',
504 'app_shim/app_shim_win.gypi',
505 'chrome_watcher/chrome_watcher.gypi',
506 'chrome_process_finder.gypi',
510 ['OS=="win" and target_arch=="ia32"',
513 'target_name': 'chrome_user32_delay_imports',
516 'lib_dir': '<(INTERMEDIATE_DIR)',
519 'chrome.user32.delay.imports'
522 '../build/win/importlibs/create_import_lib.gypi',
524 'direct_dependent_settings': {
527 'AdditionalLibraryDirectories': ['<(lib_dir)', ],
528 'AdditionalDependencies': ['chrome.user32.delay.lib', ],
534 'target_name': 'crash_service_win64',
535 'type': 'executable',
536 'product_name': 'crash_service64',
538 'installer_util_nacl_win64',
539 '../base/base.gyp:base_static_win64',
540 '../chrome/common_constants.gyp:common_constants_win64',
541 '../components/components.gyp:breakpad_crash_service_win64',
547 '../content/public/common/content_switches.cc',
548 'tools/crash_service/main.cc',
551 'COMPILE_CONTENT_STATICALLY',
555 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
560 'msvs_target_platform': 'x64',
565 ], # OS=="win" and target_arch=="ia32"
567 'includes': [ 'chrome_browser_chromeos.gypi' ],
573 # GN: //chrome/android:chrome_java
574 'target_name': 'chrome_java',
577 'activity_type_ids_java',
578 'chrome_locale_paks',
579 'chrome_resources.gyp:chrome_strings',
580 'chrome_strings_grd',
581 'chrome_version_java',
582 'connection_security_security_levels_java',
583 'connectivity_check_result_java',
584 'document_tab_model_info_proto_java',
585 'profile_account_management_metrics_java',
586 'content_setting_java',
587 'content_settings_type_java',
588 'page_info_connection_type_java',
589 'profile_sync_service_model_type_selection_java',
591 'tab_load_status_java',
592 'shortcut_source_java',
593 '../base/base.gyp:base',
594 '../chrome/android/chrome_apk.gyp:custom_tabs_service_aidl',
595 '../components/components.gyp:app_restrictions_resources',
596 '../components/components.gyp:bookmarks_java',
597 '../components/components.gyp:dom_distiller_core_java',
598 '../components/components.gyp:enhanced_bookmarks_java_enums_srcjar',
599 '../components/components.gyp:gcm_driver_java',
600 '../components/components.gyp:invalidation_java',
601 '../components/components.gyp:navigation_interception_java',
602 '../components/components.gyp:policy_java',
603 '../components/components.gyp:precache_java',
604 '../components/components.gyp:safe_json_java',
605 '../components/components.gyp:service_tab_launcher_java',
606 '../components/components.gyp:variations_java',
607 '../components/components.gyp:web_contents_delegate_android_java',
608 '../content/content.gyp:content_java',
609 '../media/media.gyp:media_java',
610 '../printing/printing.gyp:printing_java',
611 '../sync/sync.gyp:sync_java',
612 '../third_party/android_data_chart/android_data_chart.gyp:android_data_chart_java',
613 '../third_party/android_media/android_media.gyp:android_media_java',
614 '../third_party/android_protobuf/android_protobuf.gyp:protobuf_nano_javalib',
615 '../third_party/android_swipe_refresh/android_swipe_refresh.gyp:android_swipe_refresh_java',
616 '../third_party/android_tools/android_tools.gyp:android_support_design_javalib',
617 '../third_party/android_tools/android_tools.gyp:android_support_v7_appcompat_javalib',
618 '../third_party/android_tools/android_tools.gyp:android_support_v7_mediarouter_javalib',
619 '../third_party/android_tools/android_tools.gyp:android_support_v7_recyclerview_javalib',
620 '../third_party/android_tools/android_tools.gyp:android_support_v13_javalib',
621 '../third_party/android_tools/android_tools.gyp:google_play_services_javalib',
622 '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_javalib',
623 '../third_party/jsr-305/jsr-305.gyp:jsr_305_javalib',
624 '../ui/android/ui_android.gyp:ui_java',
627 'java_in_dir': '../chrome/android/java',
628 'has_java_resources': 1,
629 'R_package': 'org.chromium.chrome',
630 'R_package_relpath': 'org/chromium/chrome',
631 # Include channel-specific resources and xml string files generated
632 # from generated_resources.grd
633 'res_channel_dir': '<(java_in_dir)/res_default',
635 '<(res_channel_dir)',
636 '<(SHARED_INTERMEDIATE_DIR)/chrome/java/res',
639 '<!@(find <(res_channel_dir) -type f)',
640 '<!@pymod_do_main(grit_info <@(grit_defines) --outputs "<(SHARED_INTERMEDIATE_DIR)/chrome" app/generated_resources.grd)',
644 ['configuration_policy != 1', {
646 '../components/components.gyp:app_restrictions_resources',
651 '../build/java.gypi',
655 # GN: //chrome/android:chrome_strings_grd
656 'target_name': 'chrome_strings_grd',
659 'grd_file': '../chrome/android/java/strings/android_chrome_strings.grd',
662 '../build/java_strings_grd.gypi',
666 # GN: //chrome/android:chrome_locale_paks
667 'target_name': 'chrome_locale_paks',
670 'locale_pak_files': [ '<@(chrome_android_pak_locale_resources)' ],
673 'chrome_android_paks.gypi',
674 '../build/android/locale_pak_resources.gypi',
678 # GN: //chrome:content_setting_javagen
679 'target_name': 'content_setting_java',
682 'source_file': '../components/content_settings/core/common/content_settings.h',
684 'includes': [ '../build/android/java_cpp_enum.gypi' ],
687 # GN: //chrome:content_settings_type_javagen
688 'target_name': 'content_settings_type_java',
691 'source_file': '../components/content_settings/core/common/content_settings_types.h',
693 'includes': [ '../build/android/java_cpp_enum.gypi' ],
696 # GN: //chrome:page_info_connection_type_javagen
697 'target_name': 'page_info_connection_type_java',
700 'source_file': 'browser/ui/android/website_settings_popup_android.h',
702 'includes': [ '../build/android/java_cpp_enum.gypi' ],
706 'chrome_android.gypi',
709 ['configuration_policy==1 and OS!="android" and OS!="ios"', {
710 'includes': [ 'policy.gypi', ],
712 ['enable_extensions==1', {
714 'chrome_browser_extensions.gypi',
717 ['enable_print_preview==1', {
720 # GN version: //chrome/service
721 'target_name': 'service',
722 'type': 'static_library',
723 'variables': { 'enable_wexit_time_destructors': 1, },
725 'chrome_resources.gyp:chrome_strings',
728 '../base/base.gyp:base',
729 '../components/components.gyp:cloud_devices_common',
730 '../google_apis/google_apis.gyp:google_apis',
731 '../jingle/jingle.gyp:notifier',
732 '../net/net.gyp:net',
733 '../printing/printing.gyp:printing',
734 '../skia/skia.gyp:skia',
737 # Note: sources list duplicated in GN build.
738 'service/cloud_print/cdd_conversion_win.cc',
739 'service/cloud_print/cdd_conversion_win.h',
740 'service/cloud_print/cloud_print_auth.cc',
741 'service/cloud_print/cloud_print_auth.h',
742 'service/cloud_print/cloud_print_connector.cc',
743 'service/cloud_print/cloud_print_connector.h',
744 'service/cloud_print/cloud_print_proxy.cc',
745 'service/cloud_print/cloud_print_proxy.h',
746 'service/cloud_print/cloud_print_proxy_backend.cc',
747 'service/cloud_print/cloud_print_proxy_backend.h',
748 'service/cloud_print/cloud_print_service_helpers.cc',
749 'service/cloud_print/cloud_print_service_helpers.h',
750 'service/cloud_print/cloud_print_token_store.cc',
751 'service/cloud_print/cloud_print_token_store.h',
752 'service/cloud_print/cloud_print_url_fetcher.cc',
753 'service/cloud_print/cloud_print_url_fetcher.h',
754 'service/cloud_print/cloud_print_wipeout.cc',
755 'service/cloud_print/cloud_print_wipeout.h',
756 'service/cloud_print/connector_settings.cc',
757 'service/cloud_print/connector_settings.h',
758 'service/cloud_print/job_status_updater.cc',
759 'service/cloud_print/job_status_updater.h',
760 'service/cloud_print/print_system.cc',
761 'service/cloud_print/print_system.h',
762 'service/cloud_print/print_system_win.cc',
763 'service/cloud_print/printer_job_handler.cc',
764 'service/cloud_print/printer_job_handler.h',
765 'service/cloud_print/printer_job_queue_handler.cc',
766 'service/cloud_print/printer_job_queue_handler.h',
767 'service/net/service_url_request_context_getter.cc',
768 'service/net/service_url_request_context_getter.h',
769 'service/service_ipc_server.cc',
770 'service/service_ipc_server.h',
771 'service/service_main.cc',
772 'service/service_process.cc',
773 'service/service_process.h',
774 'service/service_process_prefs.cc',
775 'service/service_process_prefs.h',
776 'service/service_utility_process_host.cc',
777 'service/service_utility_process_host.h',
785 '../printing/printing.gyp:cups',
788 'service/cloud_print/print_system_cups.cc',
791 ['OS!="win" and use_cups!=1', {
793 'service/cloud_print/print_system_dummy.cc',
798 'service/service_utility_process_host.cc',
799 'service/service_utility_process_host.h',
808 'kasko_exe_dir': '<(DEPTH)/third_party/kasko',
812 'target_name': 'kasko_dll',
815 '<(PRODUCT_DIR)/kasko.dll',
816 '<(PRODUCT_DIR)/kasko.dll.pdb',
820 'destination': '<(PRODUCT_DIR)',
822 '<(kasko_exe_dir)/kasko.dll',
823 '<(kasko_exe_dir)/kasko.dll.pdb',
827 'direct_dependent_settings': {
830 'AdditionalDependencies': [
833 'AdditionalLibraryDirectories': [
834 '<(DEPTH)/third_party/kasko'