Disable ChannelMojo.
[chromium-blink-merge.git] / chrome / chrome.gyp
blobc3dd7d7c766ca7100cb0145605b859834454ee11
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.
5   'variables': {
6     'chromium_code': 1,
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     #
14     # GN version is the group //chrome:browser_dependencies
15     'chromium_browser_dependencies': [
16       'common',
17       'browser',
18       '../sync/sync.gyp:sync',
19     ],
20     # GN version is the group //chrome:child_dependencies
21     'chromium_child_dependencies': [
22       'common',
23       '../sync/sync.gyp:sync',
24     ],
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',
28     'conditions': [
29       ['OS!="ios"', {
30         'chromium_browser_dependencies': [
31           'debugger',
32           '../ppapi/ppapi_internal.gyp:ppapi_host',
33         ],
34         'chromium_child_dependencies': [
35           'child',
36           'plugin',
37           'renderer',
38           'utility',
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',
42         ],
43         'conditions': [
44           [ 'cld_version==0 or cld_version==2', {
45             'chromium_child_dependencies': [
46               # Use whatever CLD2 data access mode that the application
47               # embedder is using.
48               '<(DEPTH)/third_party/cld_2/cld_2.gyp:cld2_platform_impl', ],
49           }],
50           ['enable_plugins==1 and disable_nacl==0', {
51             'chromium_child_dependencies': [
52               '<(DEPTH)/components/nacl/renderer/plugin/plugin.gyp:nacl_trusted_plugin',
53             ],
54           }],
55           ['remoting==1', {
56             'chromium_child_dependencies': [
57               '../remoting/remoting.gyp:remoting_client_plugin',
58             ],
59           }],
60         ],
61       }],
62       ['enable_basic_printing==1 or enable_print_preview==1', {
63         'chromium_browser_dependencies': [
64           '../printing/printing.gyp:printing',
65         ],
66       }],
67       ['enable_print_preview==1', {
68         'chromium_browser_dependencies': [
69           'service',
70         ],
71       }],
72       ['OS=="win"', {
73         'platform_locale_settings_grd':
74             'app/resources/locale_settings_win.grd',
75       },],
76       ['OS=="linux"', {
77         'conditions': [
78           ['chromeos==1', {
79             'conditions': [
80               ['branding=="Chrome"', {
81                 'platform_locale_settings_grd':
82                     'app/resources/locale_settings_google_chromeos.grd',
83               }, {  # branding!=Chrome
84                 'platform_locale_settings_grd':
85                     'app/resources/locale_settings_chromiumos.grd',
86               }],
87             ]
88           }, {  # chromeos==0
89             'platform_locale_settings_grd':
90                 'app/resources/locale_settings_linux.grd',
91           }],
92         ],
93       },],
94       ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "linux"', {
95         'platform_locale_settings_grd':
96             'app/resources/locale_settings_linux.grd',
97       },],
98       ['OS=="mac"', {
99         'tweak_info_plist_path': '../build/mac/tweak_info_plist.py',
100         'platform_locale_settings_grd':
101             'app/resources/locale_settings_mac.grd',
102       }],  # OS=="mac"
103     ],  # conditions
104   },  # variables
105   'includes': [
106     # Place some targets in gypi files to reduce contention on this file.
107     # By using an include, we keep everything in a single xcodeproj file.
108     # Note on Win64 targets: targets that end with win64 be used
109     # on 64-bit Windows only. Targets that end with nacl_win64 should be used
110     # by Native Client only.
111     # NOTE: Most new includes should go in the OS!="ios" condition below.
112     '../build/chrome_settings.gypi',
113     '../build/util/version.gypi',
114     '../build/win_precompile.gypi',
115     'chrome_browser.gypi',
116     'chrome_browser_ui.gypi',
117     'chrome_common.gypi',
118     'chrome_installer_util.gypi',
119   ],
120   'conditions': [
121     ['OS!="ios"', {
122       'includes': [
123         '../apps/apps.gypi',
124         'app_installer/app_installer.gypi',
125         'chrome_child.gypi',
126         'chrome_debugger.gypi',
127         'chrome_dll.gypi',
128         'chrome_exe.gypi',
129         'chrome_installer.gypi',
130         'chrome_plugin.gypi',
131         'chrome_renderer.gypi',
132         'chrome_tests.gypi',
133         'chrome_tests_unit.gypi',
134         'chrome_utility.gypi',
135         'policy_templates.gypi',
136       ],
137       'targets': [
138         {
139           'target_name': 'default_extensions',
140           'type': 'none',
141           'conditions': [
142             ['OS=="win"', {
143               'copies': [
144                 {
145                   'destination': '<(PRODUCT_DIR)/extensions',
146                   'files': [
147                     'browser/extensions/default_extensions/external_extensions.json'
148                   ]
149                 }
150               ],
151             }]
152           ],
153         },
154       ],
155     }],  # OS!="ios"
156     ['OS=="mac"', {
157       'includes': [
158         'app_shim/app_shim.gypi',
159         'browser/apps/app_shim/browser_app_shim.gypi',
160       ],
161       'targets': [
162         {
163           'target_name': 'helper_app',
164           'type': 'executable',
165           'variables': { 'enable_wexit_time_destructors': 1, },
166           'product_name': '<(mac_product_name) Helper',
167           'mac_bundle': 1,
168           'dependencies': [
169             'chrome_dll',
170             'infoplist_strings_tool',
171           ],
172           'sources': [
173             # chrome_exe_main_mac.cc's main() is the entry point for
174             # the "chrome" (browser app) target.  All it does is jump
175             # to chrome_dll's ChromeMain.  This is appropriate for
176             # helper processes too, because the logic to discriminate
177             # between process types at run time is actually directed
178             # by the --type command line argument processed by
179             # ChromeMain.  Sharing chrome_exe_main_mac.cc with the
180             # browser app will suffice for now.
181             'app/chrome_exe_main_mac.cc',
182             'app/helper-Info.plist',
183           ],
184           # TODO(mark): Come up with a fancier way to do this.  It should only
185           # be necessary to list helper-Info.plist once, not the three times it
186           # is listed here.
187           'mac_bundle_resources!': [
188             'app/helper-Info.plist',
189           ],
190           # TODO(mark): For now, don't put any resources into this app.  Its
191           # resources directory will be a symbolic link to the browser app's
192           # resources directory.
193           'mac_bundle_resources/': [
194             ['exclude', '.*'],
195           ],
196           'xcode_settings': {
197             'CHROMIUM_BUNDLE_ID': '<(mac_bundle_id)',
198             'CHROMIUM_SHORT_NAME': '<(branding)',
199             'CHROMIUM_STRIP_SAVE_FILE': 'app/app.saves',
200             'INFOPLIST_FILE': 'app/helper-Info.plist',
201           },
202           'postbuilds': [
203             {
204               # The helper doesn't have real localizations, it just has
205               # empty .lproj directories, which is enough to convince Cocoa
206               # that anything running out of the helper .app supports those
207               # languages.
208               'postbuild_name': 'Make Empty Localizations',
209               'variables': {
210                 'locale_dirs': [
211                   '>!@(<(apply_locales_cmd) -d ZZLOCALE.lproj <(locales))',
212                 ],
213               },
214               'action': [
215                 'tools/build/mac/make_locale_dirs.sh',
216                 '<@(locale_dirs)',
217               ],
218             },
219             {
220               # The framework (chrome_dll) defines its load-time path
221               # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
222               # (chrome).  A different relative path needs to be used in
223               # helper_app.
224               'postbuild_name': 'Fix Framework Link',
225               'action': [
226                 'install_name_tool',
227                 '-change',
228                 '@executable_path/../Versions/<(version_full)/<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
229                 '@executable_path/../../../<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
230                 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
231               ],
232             },
233             {
234               # Modify the Info.plist as needed.  The script explains why this
235               # is needed.  This is also done in the chrome and chrome_dll
236               # targets.  In this case, --breakpad=0, --keystone=0, and --scm=0
237               # are used because Breakpad, Keystone, and SCM keys are
238               # never placed into the helper.
239               'postbuild_name': 'Tweak Info.plist',
240               'action': ['<(tweak_info_plist_path)',
241                          '--breakpad=0',
242                          '--keystone=0',
243                          '--scm=0'],
244             },
245             {
246               # Make sure there isn't any Objective-C in the helper app's
247               # executable.
248               'postbuild_name': 'Verify No Objective-C',
249               'action': [
250                 '../build/mac/verify_no_objc.sh',
251               ],
252             },
253           ],
254           'conditions': [
255             ['mac_breakpad==1', {
256               'variables': {
257                 # A real .dSYM is needed for dump_syms to operate on.
258                 'mac_real_dsym': 1,
259               },
260               'xcode_settings': {
261                 # With mac_real_dsym set, strip_from_xcode won't be used.
262                 # Specify CHROMIUM_STRIP_SAVE_FILE directly to Xcode.
263                 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
264               },
265             }],
266             ['component=="shared_library"', {
267               'xcode_settings': {
268                 'LD_RUNPATH_SEARCH_PATHS': [
269                   # Get back from Chromium.app/Contents/Versions/V/
270                   #                                    Helper.app/Contents/MacOS
271                   '@loader_path/../../../../../../..',
272                 ],
273               },
274             }],
275           ],
276         },  # target helper_app
277         {
278           # A library containing the actual code for the app mode app, shared
279           # by unit tests.
280           'target_name': 'app_mode_app_support',
281           'type': 'static_library',
282           'variables': { 'enable_wexit_time_destructors': 1, },
283           'product_name': 'app_mode_app_support',
284           'dependencies': [
285             '../base/base.gyp:base',
286             'common_constants.gyp:common_constants',
287           ],
288           'sources': [
289             'common/mac/app_mode_chrome_locator.h',
290             'common/mac/app_mode_chrome_locator.mm',
291             'common/mac/app_mode_common.h',
292             'common/mac/app_mode_common.mm',
293           ],
294           'include_dirs': [
295             '..',
296           ],
297         },  # target app_mode_app_support
298         {
299           # Convenience target to build a disk image.
300           'target_name': 'build_app_dmg',
301           # Don't place this in the 'all' list; most won't want it.
302           # In GYP, booleans are 0/1, not True/False.
303           'suppress_wildcard': 1,
304           'type': 'none',
305           'dependencies': [
306             'chrome',
307           ],
308           'variables': {
309             'build_app_dmg_script_path': 'tools/build/mac/build_app_dmg',
310             'pkg_dmg_script_path': 'installer/mac/pkg-dmg',
312             'conditions': [
313               # This duplicates the output path from build_app_dmg.
314               ['branding=="Chrome"', {
315                 'dmg_name': 'GoogleChrome.dmg',
316               }, { # else: branding!="Chrome"
317                 'dmg_name': 'Chromium.dmg',
318               }],
319             ],
320           },
321           'actions': [
322             {
323               'inputs': [
324                 '<(build_app_dmg_script_path)',
325                 '<(pkg_dmg_script_path)',
326                 '<(PRODUCT_DIR)/<(mac_product_name).app',
327               ],
328               'outputs': [
329                 '<(PRODUCT_DIR)/<(dmg_name)',
330               ],
331               'action_name': 'build_app_dmg',
332               'action': ['<(build_app_dmg_script_path)', '<@(branding)'],
333             },
334           ],  # 'actions'
335         },
336         {
337           'target_name': 'infoplist_strings_tool',
338           'type': 'executable',
339           'variables': { 'enable_wexit_time_destructors': 1, },
340           'dependencies': [
341             'chrome_resources.gyp:chrome_strings',
342             '../base/base.gyp:base',
343             '../ui/base/ui_base.gyp:ui_base',
344             '../ui/gfx/gfx.gyp:gfx',
345             '../ui/gfx/gfx.gyp:gfx_geometry',
346           ],
347           'include_dirs': [
348             '<(grit_out_dir)',
349           ],
350           'sources': [
351             'tools/mac_helpers/infoplist_strings_util.mm',
352           ],
353         },
354       ],  # targets
355     }],  # OS=="mac"
356     ['OS=="linux"',
357       { 'targets': [
358         {
359           'target_name': 'linux_symbols',
360           'type': 'none',
361           'conditions': [
362             ['linux_dump_symbols==1', {
363               'actions': [
364                 {
365                   'action_name': 'dump_symbols',
366                   'inputs': [
367                     '<(DEPTH)/build/linux/dump_app_syms',
368                     '<(PRODUCT_DIR)/dump_syms',
369                     '<(PRODUCT_DIR)/chrome',
370                   ],
371                   'outputs': [
372                     '<(PRODUCT_DIR)/chrome.breakpad.<(target_arch)',
373                   ],
374                   'action': ['<(DEPTH)/build/linux/dump_app_syms',
375                              '<(PRODUCT_DIR)/dump_syms',
376                              '<(linux_strip_binary)',
377                              '<(PRODUCT_DIR)/chrome',
378                              '<@(_outputs)'],
379                   'message': 'Dumping breakpad symbols to <(_outputs)',
380                   'process_outputs_as_sources': 1,
381                 },
382               ],
383               'dependencies': [
384                 'chrome',
385                 '../breakpad/breakpad.gyp:dump_syms',
386               ],
387             }],
388           ],
389         },
390       ],
391     }],  # OS=="linux"
392     ['OS=="win"',
393       { 'targets': [
394         {
395           # For historical reasons, chrome/chrome.sln has been the entry point
396           # for new Chrome developers. To assist development, include several
397           # core unittests that are otherwise only accessible side-by-side with
398           # chrome via all/all.sln.
399           'target_name': 'test_targets',
400           'type': 'none',
401           'dependencies': [
402             '../base/base.gyp:base_unittests',
403             '../content/content_shell_and_tests.gyp:content_browsertests',
404             '../content/content_shell_and_tests.gyp:content_shell',
405             '../content/content_shell_and_tests.gyp:content_unittests',
406             '../net/net.gyp:net_unittests',
407             '../ui/base/ui_base_tests.gyp:ui_base_unittests',
408           ],
409         },
410         {
411           'target_name': 'chrome_version_resources',
412           'type': 'none',
413           'conditions': [
414             ['branding == "Chrome"', {
415               'variables': {
416                  'branding_path': 'app/theme/google_chrome/BRANDING',
417               },
418             }, { # else branding!="Chrome"
419               'variables': {
420                  'branding_path': 'app/theme/chromium/BRANDING',
421               },
422             }],
423           ],
424           'variables': {
425             'output_dir': 'chrome_version',
426             'template_input_path': 'app/chrome_version.rc.version',
427           },
428           'direct_dependent_settings': {
429             'include_dirs': [
430               '<(SHARED_INTERMEDIATE_DIR)/<(output_dir)',
431             ],
432           },
433           'sources': [
434             'app/chrome_exe.ver',
435             'app/chrome_dll.ver',
436             'app/nacl64_exe.ver',
437             'app/other.ver',
438           ],
439           'includes': [
440             'version_resource_rules.gypi',
441           ],
442         },
443         {
444           # GN version: //chrome:version_header
445           'target_name': 'chrome_version_header',
446           'type': 'none',
447           'hard_dependency': 1,
448           'actions': [
449             {
450               'action_name': 'version_header',
451               'variables': {
452                 'lastchange_path':
453                   '<(DEPTH)/build/util/LASTCHANGE',
454               },
455               'conditions': [
456                 ['branding == "Chrome"', {
457                   'variables': {
458                      'branding_path': 'app/theme/google_chrome/BRANDING',
459                   },
460                 }, { # else branding!="Chrome"
461                   'variables': {
462                      'branding_path': 'app/theme/chromium/BRANDING',
463                   },
464                 }],
465               ],
466               'inputs': [
467                 '<(version_path)',
468                 '<(branding_path)',
469                 '<(lastchange_path)',
470                 'version.h.in',
471               ],
472               'outputs': [
473                 '<(SHARED_INTERMEDIATE_DIR)/version.h',
474               ],
475               'action': [
476                 'python',
477                 '<(version_py_path)',
478                 '-f', '<(version_path)',
479                 '-f', '<(branding_path)',
480                 '-f', '<(lastchange_path)',
481                 'version.h.in',
482                 '<@(_outputs)',
483               ],
484               'message': 'Generating version header file: <@(_outputs)',
485             },
486           ],
487         },
488         {
489           'target_name': 'crash_service',
490           'type': 'executable',
491           'dependencies': [
492             'installer_util',
493             '../base/base.gyp:base',
494             '../chrome/common_constants.gyp:common_constants',
495             '../components/components.gyp:breakpad_crash_service',
496           ],
497           'include_dirs': [
498             '..',
499           ],
500           'sources': [
501             'tools/crash_service/main.cc',
502           ],
503           'msvs_settings': {
504             'VCLinkerTool': {
505               'SubSystem': '2',         # Set /SUBSYSTEM:WINDOWS
506             },
507           },
508         },
509         {
510           'target_name': 'sb_sigutil',
511           'type': 'executable',
512           'dependencies': [
513             '../base/base.gyp:base',
514             '../crypto/crypto.gyp:crypto',
515             'safe_browsing_proto',
516           ],
517           'sources': [
518             'browser/safe_browsing/binary_feature_extractor.cc',
519             'browser/safe_browsing/binary_feature_extractor.h',
520             'browser/safe_browsing/binary_feature_extractor_win.cc',
521             'browser/safe_browsing/pe_image_reader_win.cc',
522             'browser/safe_browsing/pe_image_reader_win.h',
523             'tools/safe_browsing/sb_sigutil.cc',
524           ],
525         },
526       ],  # 'targets'
527       'includes': [
528         'app_shim/app_shim_win.gypi',
529         'chrome_watcher/chrome_watcher.gypi',
530         'chrome_process_finder.gypi',
531         'metro_utils.gypi',
532       ],
533     }],  # OS=="win"
534     ['OS=="win" and target_arch=="ia32"',
535       { 'targets': [
536         {
537           'target_name': 'chrome_user32_delay_imports',
538           'type': 'none',
539           'variables': {
540             'lib_dir': '<(INTERMEDIATE_DIR)',
541           },
542           'sources': [
543               'chrome.user32.delay.imports'
544           ],
545           'includes': [
546               '../build/win/importlibs/create_import_lib.gypi',
547           ],
548           'direct_dependent_settings': {
549             'msvs_settings': {
550               'VCLinkerTool': {
551                 'AdditionalLibraryDirectories': ['<(lib_dir)', ],
552                 'AdditionalDependencies': ['chrome.user32.delay.lib', ],
553               },
554             },
555           },
556         },
557         {
558           'target_name': 'crash_service_win64',
559           'type': 'executable',
560           'product_name': 'crash_service64',
561           'dependencies': [
562             'installer_util_nacl_win64',
563             '../base/base.gyp:base_static_win64',
564             '../chrome/common_constants.gyp:common_constants_win64',
565             '../components/components.gyp:breakpad_crash_service_win64',
566           ],
567           'include_dirs': [
568             '..',
569           ],
570           'sources': [
571             '../content/public/common/content_switches.cc',
572             'tools/crash_service/main.cc',
573           ],
574           'defines': [
575             'COMPILE_CONTENT_STATICALLY',
576           ],
577           'msvs_settings': {
578             'VCLinkerTool': {
579               'SubSystem': '2',         # Set /SUBSYSTEM:WINDOWS
580             },
581           },
582           'configurations': {
583             'Common_Base': {
584               'msvs_target_platform': 'x64',
585             },
586           },
587         },
588       ]},  # 'targets'
589     ],  # OS=="win" and target_arch=="ia32"
590     ['chromeos==1', {
591       'includes': [ 'chrome_browser_chromeos.gypi' ],
592     }],  # chromeos==1
593     ['OS=="android"',
594       {
595       'targets': [
596         {
597           # GN: //chrome/android:chrome_java
598           'target_name': 'chrome_java',
599           'type': 'none',
600           'dependencies': [
601             'activity_type_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',
611             'resource_id_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:enhanced_bookmarks_launch_location_srcjar',
618             '../components/components.gyp:gcm_driver_java',
619             '../components/components.gyp:invalidation_java',
620             '../components/components.gyp:navigation_interception_java',
621             '../components/components.gyp:variations_java',
622             '../components/components.gyp:web_contents_delegate_android_java',
623             '../content/content.gyp:content_java',
624             '../printing/printing.gyp:printing_java',
625             '../sync/sync.gyp:sync_java',
626             '../third_party/android_data_chart/android_data_chart.gyp:android_data_chart_java',
627             '../third_party/android_tools/android_tools.gyp:android_support_v7_appcompat_javalib',
628             '../third_party/android_tools/android_tools.gyp:android_support_v13_javalib',
629             '../third_party/android_tools/android_tools.gyp:google_play_services_javalib',
630             '../ui/android/ui_android.gyp:ui_java',
631           ],
632           'variables': {
633             'java_in_dir': '../chrome/android/java',
634             'has_java_resources': 1,
635             'R_package': 'org.chromium.chrome',
636             'R_package_relpath': 'org/chromium/chrome',
637             # Include xml string files generated from generated_resources.grd
638             'res_extra_dirs': ['<(SHARED_INTERMEDIATE_DIR)/chrome/java/res'],
639             'res_extra_files': ['<!@pymod_do_main(grit_info <@(grit_defines) --outputs "<(SHARED_INTERMEDIATE_DIR)/chrome" app/generated_resources.grd)'],
640           },
641           'includes': [
642             '../build/java.gypi',
643           ],
644         },
645         {
646           # GN: //chrome/android:chrome_strings_grd
647           'target_name': 'chrome_strings_grd',
648           'type': 'none',
649           'variables': {
650             'grd_file': '../chrome/android/java/strings/android_chrome_strings.grd',
651           },
652           'includes': [
653             '../build/java_strings_grd.gypi',
654           ],
655         },
656         {
657           # GN: //chrome:content_setting_javagen
658           'target_name': 'content_setting_java',
659           'type': 'none',
660           'variables': {
661             'source_file': '../components/content_settings/core/common/content_settings.h',
662           },
663           'includes': [ '../build/android/java_cpp_enum.gypi' ],
664         },
665         {
666           # GN: //chrome:content_settings_type_javagen
667           'target_name': 'content_settings_type_java',
668           'type': 'none',
669           'variables': {
670             'source_file': '../components/content_settings/core/common/content_settings_types.h',
671           },
672           'includes': [ '../build/android/java_cpp_enum.gypi' ],
673         },
674         {
675           # GN: //chrome:page_info_connection_type_javagen
676           'target_name': 'page_info_connection_type_java',
677           'type': 'none',
678           'variables': {
679             'source_file': 'browser/ui/android/website_settings_popup_android.h',
680           },
681           'includes': [ '../build/android/java_cpp_enum.gypi' ],
682         },
683       ], # 'targets'
684       'includes': [
685         'chrome_android.gypi',
686       ]}, # 'includes'
687     ],  # OS=="android"
688     ['configuration_policy==1 and OS!="android" and OS!="ios"', {
689       'includes': [ 'policy.gypi', ],
690     }],
691     ['enable_extensions==1', {
692       'includes': [
693         'chrome_browser_extensions.gypi',
694       ],
695     }],
696     ['enable_print_preview==1', {
697       'targets': [
698         {
699           # GN version: //chrome/service
700           'target_name': 'service',
701           'type': 'static_library',
702           'variables': { 'enable_wexit_time_destructors': 1, },
703           'dependencies': [
704             'chrome_resources.gyp:chrome_strings',
705             'common',
706             'common_net',
707             '../base/base.gyp:base',
708             '../components/components.gyp:cloud_devices_common',
709             '../google_apis/google_apis.gyp:google_apis',
710             '../jingle/jingle.gyp:notifier',
711             '../net/net.gyp:net',
712             '../printing/printing.gyp:printing',
713             '../skia/skia.gyp:skia',
714             '../third_party/libjingle/libjingle.gyp:libjingle',
715           ],
716           'sources': [
717             # Note: sources list duplicated in GN build.
718             'service/cloud_print/cdd_conversion_win.cc',
719             'service/cloud_print/cdd_conversion_win.h',
720             'service/cloud_print/cloud_print_auth.cc',
721             'service/cloud_print/cloud_print_auth.h',
722             'service/cloud_print/cloud_print_connector.cc',
723             'service/cloud_print/cloud_print_connector.h',
724             'service/cloud_print/cloud_print_proxy.cc',
725             'service/cloud_print/cloud_print_proxy.h',
726             'service/cloud_print/cloud_print_proxy_backend.cc',
727             'service/cloud_print/cloud_print_proxy_backend.h',
728             'service/cloud_print/cloud_print_service_helpers.cc',
729             'service/cloud_print/cloud_print_service_helpers.h',
730             'service/cloud_print/cloud_print_token_store.cc',
731             'service/cloud_print/cloud_print_token_store.h',
732             'service/cloud_print/cloud_print_url_fetcher.cc',
733             'service/cloud_print/cloud_print_url_fetcher.h',
734             'service/cloud_print/cloud_print_wipeout.cc',
735             'service/cloud_print/cloud_print_wipeout.h',
736             'service/cloud_print/connector_settings.cc',
737             'service/cloud_print/connector_settings.h',
738             'service/cloud_print/job_status_updater.cc',
739             'service/cloud_print/job_status_updater.h',
740             'service/cloud_print/print_system.cc',
741             'service/cloud_print/print_system.h',
742             'service/cloud_print/print_system_win.cc',
743             'service/cloud_print/printer_job_handler.cc',
744             'service/cloud_print/printer_job_handler.h',
745             'service/cloud_print/printer_job_queue_handler.cc',
746             'service/cloud_print/printer_job_queue_handler.h',
747             'service/net/service_url_request_context_getter.cc',
748             'service/net/service_url_request_context_getter.h',
749             'service/service_ipc_server.cc',
750             'service/service_ipc_server.h',
751             'service/service_main.cc',
752             'service/service_process.cc',
753             'service/service_process.h',
754             'service/service_process_prefs.cc',
755             'service/service_process_prefs.h',
756             'service/service_utility_process_host.cc',
757             'service/service_utility_process_host.h',
758           ],
759           'include_dirs': [
760             '..',
761           ],
762           'conditions': [
763             ['use_cups==1', {
764               'dependencies': [
765                 '../printing/printing.gyp:cups',
766               ],
767               'sources': [
768                 'service/cloud_print/print_system_cups.cc',
769               ],
770             }],
771             ['OS!="win" and use_cups!=1', {
772               'sources': [
773                 'service/cloud_print/print_system_dummy.cc',
774               ],
775             }],
776             ['OS!="win"', {
777               'sources!': [
778                 'service/service_utility_process_host.cc',
779                 'service/service_utility_process_host.h',
780               ],
781             }],
782           ],
783         },
784       ],
785     }],
786     ['kasko==1', {
787       'variables': {
788         'kasko_exe_dir': '<(DEPTH)/third_party/kasko',
789       },
790       'targets': [
791         {
792           'target_name': 'kasko_dll',
793           'type': 'none',
794           'outputs': [
795             '<(PRODUCT_DIR)/kasko.dll',
796             '<(PRODUCT_DIR)/kasko.dll.pdb',
797           ],
798           'copies': [
799             {
800               'destination': '<(PRODUCT_DIR)',
801               'files': [
802                 '<(kasko_exe_dir)/kasko.dll',
803                 '<(kasko_exe_dir)/kasko.dll.pdb',
804               ],
805             },
806           ],
807           'direct_dependent_settings': {
808             'msvs_settings': {
809               'VCLinkerTool': {
810                 'AdditionalDependencies': [
811                   'kasko.dll.lib',
812                 ],
813                 'AdditionalLibraryDirectories': [
814                   '<(DEPTH)/third_party/kasko'
815                 ],
816               },
817             },
818           },
819         },
820       ],
821     }],
822   ],  # 'conditions'