Home | History | Annotate | Download | only in service
      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.
      4 {
      5   'target_defaults': {
      6     'variables': {
      7       'chromium_code': 1,
      8       'enable_wexit_time_destructors': 1,
      9     },
     10     'include_dirs': [
     11       '<(DEPTH)',
     12       # To allow including "version.h"
     13       '<(SHARED_INTERMEDIATE_DIR)',
     14     ],
     15     'defines' : [
     16       'COMPILE_CONTENT_STATICALLY',
     17       'SECURITY_WIN32',
     18       'STRICT',
     19       '_ATL_APARTMENT_THREADED',
     20       '_ATL_CSTRING_EXPLICIT_CONSTRUCTORS',
     21       '_ATL_NO_COM_SUPPORT',
     22       '_ATL_NO_AUTOMATIC_NAMESPACE',
     23       '_ATL_NO_EXCEPTIONS',
     24     ],
     25     'conditions': [
     26       ['OS=="win"', {
     27         # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
     28         'msvs_disabled_warnings': [ 4267, ],
     29       }],
     30     ],
     31   },
     32   'targets': [
     33     {
     34       'target_name': 'service_resources',
     35       'type': 'none',
     36       'variables': {
     37         'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/cloud_print',
     38       },
     39       'actions': [
     40         {
     41           'action_name': 'service_resources',
     42           'variables': {
     43             'grit_grd_file': 'win/service_resources.grd',
     44           },
     45           'includes': [ '../../build/grit_action.gypi' ],
     46         },
     47       ],
     48       'includes': [ '../../build/grit_target.gypi' ],
     49     },
     50     {
     51       'target_name': 'cloud_print_service_lib',
     52       'type': 'static_library',
     53       'dependencies': [
     54         '<(DEPTH)/base/base.gyp:base',
     55         '<(DEPTH)/base/base.gyp:base_static',
     56         '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
     57         '<(DEPTH)/google_apis/google_apis.gyp:google_apis',
     58         '<(DEPTH)/ipc/ipc.gyp:ipc',
     59         '<(DEPTH)/net/net.gyp:net',
     60         '<(DEPTH)/url/url.gyp:url_lib',
     61         'service_resources',
     62       ],
     63       'conditions': [
     64         ['OS=="win"', {
     65           'dependencies': [
     66             '<(DEPTH)/chrome/chrome.gyp:chrome_version_header',
     67             '<(DEPTH)/chrome/chrome.gyp:launcher_support',
     68             '<(DEPTH)/chrome/common_constants.gyp:common_constants',
     69           ],
     70         }],
     71         ['enable_printing!=0', {
     72           'dependencies': [
     73             '<(DEPTH)/printing/printing.gyp:printing',
     74           ],
     75         }],
     76       ],
     77       'sources': [
     78         '<(DEPTH)/content/public/common/content_switches.h',
     79         '<(DEPTH)/content/public/common/content_switches.cc',
     80         '<(DEPTH)/cloud_print/common/win/cloud_print_utils.cc',
     81         '<(DEPTH)/cloud_print/common/win/cloud_print_utils.h',
     82         'service_constants.cc',
     83         'service_constants.h',
     84         'service_state.cc',
     85         'service_state.h',
     86         'service_switches.cc',
     87         'service_switches.h',
     88         'win/chrome_launcher.cc',
     89         'win/chrome_launcher.h',
     90         'win/local_security_policy.cc',
     91         'win/local_security_policy.h',
     92         'win/service_controller.cc',
     93         'win/service_controller.h',
     94         'win/service_listener.cc',
     95         'win/service_listener.h',
     96         'win/service_utils.cc',
     97         'win/service_utils.h',
     98         'win/setup_listener.cc',
     99         'win/setup_listener.h',
    100       ],
    101     },
    102     {
    103       'target_name': 'cloud_print_service',
    104       'type': 'executable',
    105       'sources': [
    106         '<(SHARED_INTERMEDIATE_DIR)/cloud_print/cloud_print_service_exe_version.rc',
    107         'win/cloud_print_service.cc',
    108       ],
    109       'includes': [
    110         'win/service_resources.gypi'
    111       ],
    112       'dependencies': [
    113         'cloud_print_service_lib',
    114       ],
    115       'msvs_settings': {
    116         'VCLinkerTool': {
    117           'SubSystem': '1',         # Set /SUBSYSTEM:CONSOLE
    118           'UACExecutionLevel': '2', # /level='requireAdministrator'
    119           'AdditionalDependencies': [
    120               'secur32.lib',
    121           ],
    122         },
    123       },
    124     },
    125     {
    126       'target_name': 'cloud_print_service_config',
    127       'type': 'executable',
    128       'sources': [
    129         '<(SHARED_INTERMEDIATE_DIR)/cloud_print/cloud_print_service_config_exe_version.rc',
    130         'win/cloud_print_service_config.cc',
    131       ],
    132       'includes': [
    133         'win/service_resources.gypi'
    134       ],
    135       'dependencies': [
    136         '<(DEPTH)/cloud_print/common/common.gyp:cloud_print_install_lib',
    137         'cloud_print_service_lib',
    138       ],
    139       'msvs_settings': {
    140         'VCManifestTool': {
    141           'AdditionalManifestFiles': [
    142             'common-controls.manifest',
    143           ],
    144         },
    145         'VCLinkerTool': {
    146           'SubSystem': '2',         # Set /SUBSYSTEM:WINDOWS
    147           'UACExecutionLevel': '2', # /level='requireAdministrator'
    148           'AdditionalDependencies': [
    149               'secur32.lib',
    150           ],
    151         },
    152       },
    153     },
    154     {
    155       'target_name': 'cloud_print_service_setup',
    156       'type': 'executable',
    157       'sources': [
    158         '<(SHARED_INTERMEDIATE_DIR)/cloud_print/cloud_print_service_setup_exe_version.rc',
    159         'win/installer.cc',
    160         'win/installer.h',
    161       ],
    162       'includes': [
    163         'win/service_resources.gypi'
    164       ],
    165       'dependencies': [
    166         '<(DEPTH)/cloud_print/common/common.gyp:cloud_print_install_lib',
    167         'cloud_print_service_lib',
    168       ],
    169       'msvs_settings': {
    170         'VCLinkerTool': {
    171           'SubSystem': '2',         # Set /SUBSYSTEM:WINDOWS
    172           'UACExecutionLevel': '2', # /level='requireAdministrator'
    173           'AdditionalDependencies': [
    174               'secur32.lib',
    175           ],
    176         },
    177       },
    178     },
    179   ],
    180 }
    181