summaryrefslogtreecommitdiffstats
path: root/cloud_print/service/win/service.gyp
blob: a00c5d361e86c79331a7e0099252e53db164d91d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
  'target_defaults': {
    'variables': {
      'chromium_code': 1,
      'enable_wexit_time_destructors': 1,
    },
    'include_dirs': [
      '<(DEPTH)',
      # To allow including "version.h"
      '<(SHARED_INTERMEDIATE_DIR)',
    ],
    'defines' : [
      'COMPILE_CONTENT_STATICALLY',
      'SECURITY_WIN32',
      'STRICT',
      '_ATL_APARTMENT_THREADED',
      '_ATL_CSTRING_EXPLICIT_CONSTRUCTORS',
      '_ATL_NO_COM_SUPPORT',
      '_ATL_NO_AUTOMATIC_NAMESPACE',
      '_ATL_NO_EXCEPTIONS',
    ],
    # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
    'msvs_disabled_warnings': [ 4267, ],
  },
  'targets': [
    {
      'target_name': 'cloud_print_service',
      'type': 'executable',
      'sources': [
        '<(SHARED_INTERMEDIATE_DIR)/cloud_print/cloud_print_service_exe_version.rc',
        'cloud_print_service.cc',
      ],
      'includes': [
        'service_resources.gypi'
      ],
      'dependencies': [
        '<(DEPTH)/cloud_print/cloud_print_resources.gyp:cloud_print_version_resources',
        '<(DEPTH)/cloud_print/service/service.gyp:cloud_print_service_lib',
      ],
      'msvs_settings': {
        'VCLinkerTool': {
          'SubSystem': '1',         # Set /SUBSYSTEM:CONSOLE
          'UACExecutionLevel': '2', # /level='requireAdministrator'
          'AdditionalDependencies': [
              'secur32.lib',
          ],
        },
      },
    },
    {
      'target_name': 'cloud_print_service_config',
      'type': 'executable',
      'sources': [
        '<(SHARED_INTERMEDIATE_DIR)/cloud_print/cloud_print_service_config_exe_version.rc',
        'cloud_print_service_config.cc',
      ],
      'includes': [
        'service_resources.gypi'
      ],
      'dependencies': [
        '<(DEPTH)/cloud_print/cloud_print_resources.gyp:cloud_print_version_resources',
        '<(DEPTH)/cloud_print/common/common.gyp:cloud_print_install_lib',
        '<(DEPTH)/cloud_print/service/service.gyp:cloud_print_service_lib',
      ],
      'msvs_settings': {
        'VCManifestTool': {
          'AdditionalManifestFiles': [
            'common-controls.manifest',
          ],
        },
        'VCLinkerTool': {
          'SubSystem': '2',         # Set /SUBSYSTEM:WINDOWS
          'UACExecutionLevel': '2', # /level='requireAdministrator'
          'AdditionalDependencies': [
              'secur32.lib',
          ],
        },
        'conditions': [
          ['clang==1', {
            # TODO: Remove once cloud_print_service_config.cc no longer depends
            # on atlapp.h, http://crbug.com/5027
            'VCCLCompilerTool': {
              'AdditionalOptions': [
                # atlapp.h contains a global "using namespace WTL;".
                '-Wno-header-hygiene',
                # atlgdi.h does an intentional assignment in an if conditional.
                '-Wno-parentheses',
              ],
            },
          }],
        ],
      },
    },
    {
      'target_name': 'cloud_print_service_setup',
      'type': 'executable',
      'sources': [
        '<(SHARED_INTERMEDIATE_DIR)/cloud_print/cloud_print_service_setup_exe_version.rc',
        'installer.cc',
        'installer.h',
      ],
      'includes': [
        'service_resources.gypi'
      ],
      'dependencies': [
        '<(DEPTH)/cloud_print/cloud_print_resources.gyp:cloud_print_version_resources',
        '<(DEPTH)/cloud_print/common/common.gyp:cloud_print_install_lib',
        '<(DEPTH)/cloud_print/service/service.gyp:cloud_print_service_lib',
      ],
      'msvs_settings': {
        'VCLinkerTool': {
          'SubSystem': '2',         # Set /SUBSYSTEM:WINDOWS
          'UACExecutionLevel': '2', # /level='requireAdministrator'
          'AdditionalDependencies': [
              'secur32.lib',
          ],
        },
      },
    },
  ],
}