CacheStorage: Clean up CacheStorageCache
[chromium-blink-merge.git] / chrome / chrome.gyp
blob46108eedf7e72761cbc0e7a4d56eec1025712f58
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           # GN: //chrome/common:app_mode_app_support
281           'target_name': 'app_mode_app_support',
282           'type': 'static_library',
283           'variables': { 'enable_wexit_time_destructors': 1, },
284           'product_name': 'app_mode_app_support',
285           'dependencies': [
286             '../base/base.gyp:base',
287             'common_constants.gyp:common_constants',
288           ],
289           'sources': [
290             'common/mac/app_mode_chrome_locator.h',
291             'common/mac/app_mode_chrome_locator.mm',
292             'common/mac/app_mode_common.h',
293             'common/mac/app_mode_common.mm',
294           ],
295           'include_dirs': [
296             '..',
297           ],
298         },  # target app_mode_app_support
299         {
300           # Convenience target to build a disk image.
301           'target_name': 'build_app_dmg',
302           # Don't place this in the 'all' list; most won't want it.
303           # In GYP, booleans are 0/1, not True/False.
304           'suppress_wildcard': 1,
305           'type': 'none',
306           'dependencies': [
307             'chrome',
308           ],
309           'variables': {
310             'build_app_dmg_script_path': 'tools/build/mac/build_app_dmg',
311             'pkg_dmg_script_path': 'installer/mac/pkg-dmg',
313             'conditions': [
314               # This duplicates the output path from build_app_dmg.
315               ['branding=="Chrome"', {
316                 'dmg_name': 'GoogleChrome.dmg',
317               }, { # else: branding!="Chrome"
318                 'dmg_name': 'Chromium.dmg',
319               }],
320             ],
321           },
322           'actions': [
323             {
324               'inputs': [
325                 '<(build_app_dmg_script_path)',
326                 '<(pkg_dmg_script_path)',
327                 '<(PRODUCT_DIR)/<(mac_product_name).app',
328               ],
329               'outputs': [
330                 '<(PRODUCT_DIR)/<(dmg_name)',
331               ],
332               'action_name': 'build_app_dmg',
333               'action': ['<(build_app_dmg_script_path)', '<@(branding)'],
334             },
335           ],  # 'actions'
336         },
337         {
338           'target_name': 'infoplist_strings_tool',
339           'type': 'executable',
340           'variables': { 'enable_wexit_time_destructors': 1, },
341           'dependencies': [
342             'chrome_resources.gyp:chrome_strings',
343             '../base/base.gyp:base',
344             '../ui/base/ui_base.gyp:ui_base',
345             '../ui/gfx/gfx.gyp:gfx',
346             '../ui/gfx/gfx.gyp:gfx_geometry',
347           ],
348           'include_dirs': [
349             '<(grit_out_dir)',
350           ],
351           'sources': [
352             'tools/mac_helpers/infoplist_strings_util.mm',
353           ],
354         },
355       ],  # targets
356     }],  # OS=="mac"
357     ['OS=="linux"',
358       { 'targets': [
359         {
360           'target_name': 'linux_symbols',
361           'type': 'none',
362           'conditions': [
363             ['linux_dump_symbols==1', {
364               'actions': [
365                 {
366                   'action_name': 'dump_symbols',
367                   'inputs': [
368                     '<(DEPTH)/build/linux/dump_app_syms',
369                     '<(PRODUCT_DIR)/dump_syms',
370                     '<(PRODUCT_DIR)/chrome',
371                   ],
372                   'outputs': [
373                     '<(PRODUCT_DIR)/chrome.breakpad.<(target_arch)',
374                   ],
375                   'action': ['<(DEPTH)/build/linux/dump_app_syms',
376                              '<(PRODUCT_DIR)/dump_syms',
377                              '<(linux_strip_binary)',
378                              '<(PRODUCT_DIR)/chrome',
379                              '<@(_outputs)'],
380                   'message': 'Dumping breakpad symbols to <(_outputs)',
381                   'process_outputs_as_sources': 1,
382                 },
383               ],
384               'dependencies': [
385                 'chrome',
386                 '../breakpad/breakpad.gyp:dump_syms#host',
387               ],
388             }],
389           ],
390         },
391       ],
392     }],  # OS=="linux"
393     ['OS=="win"',
394       { 'targets': [
395         {
396           # For historical reasons, chrome/chrome.sln has been the entry point
397           # for new Chrome developers. To assist development, include several
398           # core unittests that are otherwise only accessible side-by-side with
399           # chrome via all/all.sln.
400           'target_name': 'test_targets',
401           'type': 'none',
402           'dependencies': [
403             '../base/base.gyp:base_unittests',
404             '../content/content_shell_and_tests.gyp:content_browsertests',
405             '../content/content_shell_and_tests.gyp:content_shell',
406             '../content/content_shell_and_tests.gyp:content_unittests',
407             '../net/net.gyp:net_unittests',
408             '../ui/base/ui_base_tests.gyp:ui_base_unittests',
409           ],
410         },
411         {
412           'target_name': 'chrome_version_resources',
413           'type': 'none',
414           'variables': {
415             'output_dir': 'chrome_version',
416             'template_input_path': 'app/chrome_version.rc.version',
417             'branding_path': 'app/theme/<(branding_path_component)/BRANDING',
418           },
419           'direct_dependent_settings': {
420             'include_dirs': [
421               '<(SHARED_INTERMEDIATE_DIR)/<(output_dir)',
422             ],
423           },
424           'sources': [
425             'app/chrome_exe.ver',
426             'app/chrome_dll.ver',
427             'app/nacl64_exe.ver',
428             'app/other.ver',
429           ],
430           'includes': [
431             'version_resource_rules.gypi',
432           ],
433         },
434         {
435           # GN version: //chrome:version_header
436           'target_name': 'chrome_version_header',
437           'type': 'none',
438           'hard_dependency': 1,
439           'actions': [
440             {
441               'action_name': 'version_header',
442               'variables': {
443                 'lastchange_path':
444                   '<(DEPTH)/build/util/LASTCHANGE',
445                 'branding_path': 'app/theme/<(branding_path_component)/BRANDING',
446               },
447               'inputs': [
448                 '<(version_path)',
449                 '<(branding_path)',
450                 '<(lastchange_path)',
451                 'version.h.in',
452               ],
453               'outputs': [
454                 '<(SHARED_INTERMEDIATE_DIR)/version.h',
455               ],
456               'action': [
457                 'python',
458                 '<(version_py_path)',
459                 '-f', '<(version_path)',
460                 '-f', '<(branding_path)',
461                 '-f', '<(lastchange_path)',
462                 'version.h.in',
463                 '<@(_outputs)',
464               ],
465               'message': 'Generating version header file: <@(_outputs)',
466             },
467           ],
468         },
469         {
470           'target_name': 'crash_service',
471           'type': 'executable',
472           'dependencies': [
473             'installer_util',
474             '../base/base.gyp:base',
475             '../chrome/common_constants.gyp:common_constants',
476             '../components/components.gyp:breakpad_crash_service',
477           ],
478           'include_dirs': [
479             '..',
480           ],
481           'sources': [
482             'tools/crash_service/main.cc',
483           ],
484           'msvs_settings': {
485             'VCLinkerTool': {
486               'SubSystem': '2',         # Set /SUBSYSTEM:WINDOWS
487             },
488           },
489         },
490         {
491           'target_name': 'sb_sigutil',
492           'type': 'executable',
493           'dependencies': [
494             '../base/base.gyp:base',
495             '../crypto/crypto.gyp:crypto',
496             'safe_browsing_proto',
497           ],
498           'sources': [
499             'common/safe_browsing/binary_feature_extractor.cc',
500             'common/safe_browsing/binary_feature_extractor.h',
501             'common/safe_browsing/binary_feature_extractor_win.cc',
502             'common/safe_browsing/pe_image_reader_win.cc',
503             'common/safe_browsing/pe_image_reader_win.h',
504             'tools/safe_browsing/sb_sigutil.cc',
505           ],
506         },
507       ],  # 'targets'
508       'includes': [
509         'app_shim/app_shim_win.gypi',
510         'chrome_watcher/chrome_watcher.gypi',
511         'chrome_process_finder.gypi',
512         'metro_utils.gypi',
513       ],
514     }],  # OS=="win"
515     ['OS=="win" and target_arch=="ia32"',
516       { 'targets': [
517         {
518           'target_name': 'chrome_user32_delay_imports',
519           'type': 'none',
520           'variables': {
521             'lib_dir': '<(INTERMEDIATE_DIR)',
522           },
523           'sources': [
524               'chrome.user32.delay.imports'
525           ],
526           'includes': [
527               '../build/win/importlibs/create_import_lib.gypi',
528           ],
529           'direct_dependent_settings': {
530             'msvs_settings': {
531               'VCLinkerTool': {
532                 'AdditionalLibraryDirectories': ['<(lib_dir)', ],
533                 'AdditionalDependencies': ['chrome.user32.delay.lib', ],
534               },
535             },
536           },
537         },
538         {
539           'target_name': 'crash_service_win64',
540           'type': 'executable',
541           'product_name': 'crash_service64',
542           'dependencies': [
543             'installer_util_nacl_win64',
544             '../base/base.gyp:base_static_win64',
545             '../chrome/common_constants.gyp:common_constants_win64',
546             '../components/components.gyp:breakpad_crash_service_win64',
547           ],
548           'include_dirs': [
549             '..',
550           ],
551           'sources': [
552             '../content/public/common/content_switches.cc',
553             'tools/crash_service/main.cc',
554           ],
555           'defines': [
556             'COMPILE_CONTENT_STATICALLY',
557           ],
558           'msvs_settings': {
559             'VCLinkerTool': {
560               'SubSystem': '2',         # Set /SUBSYSTEM:WINDOWS
561             },
562           },
563           'configurations': {
564             'Common_Base': {
565               'msvs_target_platform': 'x64',
566             },
567           },
568         },
569       ]},  # 'targets'
570     ],  # OS=="win" and target_arch=="ia32"
571     ['chromeos==1', {
572       'includes': [ 'chrome_browser_chromeos.gypi' ],
573     }],  # chromeos==1
574     ['OS=="android"',
575       {
576       'targets': [
577         {
578           # GN: //chrome/android:chrome_java
579           'target_name': 'chrome_java',
580           'type': 'none',
581           'dependencies': [
582             'activity_type_ids_java',
583             'chrome_resources.gyp:chrome_strings',
584             'chrome_strings_grd',
585             'chrome_version_java',
586             'document_tab_model_info_proto_java',
587             'profile_account_management_metrics_java',
588             'content_setting_java',
589             'content_settings_type_java',
590             'page_info_connection_type_java',
591             'profile_sync_service_model_type_selection_java',
592             'resource_id_java',
593             'toolbar_model_security_levels_java',
594             'tab_load_status_java',
595             '../base/base.gyp:base',
596             '../components/components.gyp:bookmarks_java',
597             '../components/components.gyp:dom_distiller_core_java',
598             '../components/components.gyp:enhanced_bookmarks_launch_location_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:service_tab_launcher_java',
603             '../components/components.gyp:precache_java',
604             '../components/components.gyp:variations_java',
605             '../components/components.gyp:web_contents_delegate_android_java',
606             '../content/content.gyp:content_java',
607             '../media/media.gyp:media_java',
608             '../printing/printing.gyp:printing_java',
609             '../sync/sync.gyp:sync_java',
610             '../third_party/android_data_chart/android_data_chart.gyp:android_data_chart_java',
611             '../third_party/android_media/android_media.gyp:android_media_java',
612             '../third_party/android_swipe_refresh/android_swipe_refresh.gyp:android_swipe_refresh_java',
613             '../third_party/android_tools/android_tools.gyp:android_support_v7_appcompat_javalib',
614             '../third_party/android_tools/android_tools.gyp:android_support_v7_mediarouter_javalib',
615             '../third_party/android_tools/android_tools.gyp:android_support_v13_javalib',
616             '../third_party/android_tools/android_tools.gyp:google_play_services_javalib',
617             '../ui/android/ui_android.gyp:ui_java',
618           ],
619           'variables': {
620             'java_in_dir': '../chrome/android/java',
621             'has_java_resources': 1,
622             'R_package': 'org.chromium.chrome',
623             'R_package_relpath': 'org/chromium/chrome',
624             # Include xml string files generated from generated_resources.grd
625             'res_extra_dirs': ['<(SHARED_INTERMEDIATE_DIR)/chrome/java/res'],
626             'res_extra_files': ['<!@pymod_do_main(grit_info <@(grit_defines) --outputs "<(SHARED_INTERMEDIATE_DIR)/chrome" app/generated_resources.grd)'],
627           },
628           'includes': [
629             '../build/java.gypi',
630           ],
631         },
632         {
633           # GN: //chrome/android:chrome_strings_grd
634           'target_name': 'chrome_strings_grd',
635           'type': 'none',
636           'variables': {
637             'grd_file': '../chrome/android/java/strings/android_chrome_strings.grd',
638           },
639           'includes': [
640             '../build/java_strings_grd.gypi',
641           ],
642         },
643         {
644           # GN: //chrome:content_setting_javagen
645           'target_name': 'content_setting_java',
646           'type': 'none',
647           'variables': {
648             'source_file': '../components/content_settings/core/common/content_settings.h',
649           },
650           'includes': [ '../build/android/java_cpp_enum.gypi' ],
651         },
652         {
653           # GN: //chrome:content_settings_type_javagen
654           'target_name': 'content_settings_type_java',
655           'type': 'none',
656           'variables': {
657             'source_file': '../components/content_settings/core/common/content_settings_types.h',
658           },
659           'includes': [ '../build/android/java_cpp_enum.gypi' ],
660         },
661         {
662           # GN: //chrome:page_info_connection_type_javagen
663           'target_name': 'page_info_connection_type_java',
664           'type': 'none',
665           'variables': {
666             'source_file': 'browser/ui/android/website_settings_popup_android.h',
667           },
668           'includes': [ '../build/android/java_cpp_enum.gypi' ],
669         },
670       ], # 'targets'
671       'includes': [
672         'chrome_android.gypi',
673       ]}, # 'includes'
674     ],  # OS=="android"
675     ['configuration_policy==1 and OS!="android" and OS!="ios"', {
676       'includes': [ 'policy.gypi', ],
677     }],
678     ['enable_extensions==1', {
679       'includes': [
680         'chrome_browser_extensions.gypi',
681       ],
682     }],
683     ['enable_print_preview==1', {
684       'targets': [
685         {
686           # GN version: //chrome/service
687           'target_name': 'service',
688           'type': 'static_library',
689           'variables': { 'enable_wexit_time_destructors': 1, },
690           'dependencies': [
691             'chrome_resources.gyp:chrome_strings',
692             'common',
693             'common_net',
694             '../base/base.gyp:base',
695             '../components/components.gyp:cloud_devices_common',
696             '../google_apis/google_apis.gyp:google_apis',
697             '../jingle/jingle.gyp:notifier',
698             '../net/net.gyp:net',
699             '../printing/printing.gyp:printing',
700             '../skia/skia.gyp:skia',
701             '../third_party/libjingle/libjingle.gyp:libjingle',
702           ],
703           'sources': [
704             # Note: sources list duplicated in GN build.
705             'service/cloud_print/cdd_conversion_win.cc',
706             'service/cloud_print/cdd_conversion_win.h',
707             'service/cloud_print/cloud_print_auth.cc',
708             'service/cloud_print/cloud_print_auth.h',
709             'service/cloud_print/cloud_print_connector.cc',
710             'service/cloud_print/cloud_print_connector.h',
711             'service/cloud_print/cloud_print_proxy.cc',
712             'service/cloud_print/cloud_print_proxy.h',
713             'service/cloud_print/cloud_print_proxy_backend.cc',
714             'service/cloud_print/cloud_print_proxy_backend.h',
715             'service/cloud_print/cloud_print_service_helpers.cc',
716             'service/cloud_print/cloud_print_service_helpers.h',
717             'service/cloud_print/cloud_print_token_store.cc',
718             'service/cloud_print/cloud_print_token_store.h',
719             'service/cloud_print/cloud_print_url_fetcher.cc',
720             'service/cloud_print/cloud_print_url_fetcher.h',
721             'service/cloud_print/cloud_print_wipeout.cc',
722             'service/cloud_print/cloud_print_wipeout.h',
723             'service/cloud_print/connector_settings.cc',
724             'service/cloud_print/connector_settings.h',
725             'service/cloud_print/job_status_updater.cc',
726             'service/cloud_print/job_status_updater.h',
727             'service/cloud_print/print_system.cc',
728             'service/cloud_print/print_system.h',
729             'service/cloud_print/print_system_win.cc',
730             'service/cloud_print/printer_job_handler.cc',
731             'service/cloud_print/printer_job_handler.h',
732             'service/cloud_print/printer_job_queue_handler.cc',
733             'service/cloud_print/printer_job_queue_handler.h',
734             'service/net/service_url_request_context_getter.cc',
735             'service/net/service_url_request_context_getter.h',
736             'service/service_ipc_server.cc',
737             'service/service_ipc_server.h',
738             'service/service_main.cc',
739             'service/service_process.cc',
740             'service/service_process.h',
741             'service/service_process_prefs.cc',
742             'service/service_process_prefs.h',
743             'service/service_utility_process_host.cc',
744             'service/service_utility_process_host.h',
745           ],
746           'include_dirs': [
747             '..',
748           ],
749           'conditions': [
750             ['use_cups==1', {
751               'dependencies': [
752                 '../printing/printing.gyp:cups',
753               ],
754               'sources': [
755                 'service/cloud_print/print_system_cups.cc',
756               ],
757             }],
758             ['OS!="win" and use_cups!=1', {
759               'sources': [
760                 'service/cloud_print/print_system_dummy.cc',
761               ],
762             }],
763             ['OS!="win"', {
764               'sources!': [
765                 'service/service_utility_process_host.cc',
766                 'service/service_utility_process_host.h',
767               ],
768             }],
769           ],
770         },
771       ],
772     }],
773     ['kasko==1', {
774       'variables': {
775         'kasko_exe_dir': '<(DEPTH)/third_party/kasko',
776       },
777       'targets': [
778         {
779           'target_name': 'kasko_dll',
780           'type': 'none',
781           'outputs': [
782             '<(PRODUCT_DIR)/kasko.dll',
783             '<(PRODUCT_DIR)/kasko.dll.pdb',
784           ],
785           'copies': [
786             {
787               'destination': '<(PRODUCT_DIR)',
788               'files': [
789                 '<(kasko_exe_dir)/kasko.dll',
790                 '<(kasko_exe_dir)/kasko.dll.pdb',
791               ],
792             },
793           ],
794           'direct_dependent_settings': {
795             'msvs_settings': {
796               'VCLinkerTool': {
797                 'AdditionalDependencies': [
798                   'kasko.dll.lib',
799                 ],
800                 'AdditionalLibraryDirectories': [
801                   '<(DEPTH)/third_party/kasko'
802                 ],
803               },
804             },
805           },
806         },
807       ],
808     }],
809   ],  # 'conditions'