Make hitting "Enter" submit the add/change profile dialog.
[chromium-blink-merge.git] / chrome / chrome_dll.gypi
blob169ac1e64771bd972bd8fa9042474138304a7efa
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   'conditions': [
6     ['OS=="mac" or OS=="win"', {
7       'targets': [
8         {
9           'target_name': 'chrome_dll',
10           'type': 'none',
11           'dependencies': [
12             'chrome_main_dll',
13           ],
14           'conditions': [
15             ['OS=="mac" and component=="shared_library"', {
16               'type': 'shared_library',
17               'includes': [ 'chrome_dll_bundle.gypi' ],
18               'xcode_settings': {
19                 'OTHER_LDFLAGS': [
20                   '-Wl,-reexport_library,<(PRODUCT_DIR)/libchrome_main_dll.dylib',
21                 ],
22               },
23             }],  # OS=="mac"
24             ['incremental_chrome_dll==1', {
25               # Linking to a different directory and then hardlinking back
26               # to OutDir is a workaround to avoid having the .ilk for
27               # chrome.exe and chrome.dll conflicting. See crbug.com/92528
28               # for more information. Done on the dll instead of the exe so
29               # that people launching from VS don't need to modify
30               # $(TargetPath) for the exe.
31               'actions': [
32                 {
33                   'action_name': 'hardlink_to_output',
34                   'inputs': [
35                     '$(OutDir)\\initial\\chrome.dll',
36                   ],
37                   'outputs': [
38                     '$(OutDir)\\chrome.dll',
39                   ],
40                   'action': ['tools\\build\\win\\hardlink_failsafe.bat',
41                              '$(OutDir)\\initial\\chrome.dll',
42                              '$(OutDir)\\chrome.dll'],
43                   'msvs_cygwin_shell': 0,
44                 },
45               ],
46               'conditions': [
47                 # Only hardlink pdb if we're generating debug info.
48                 ['fastbuild==0 or win_z7!=0', {
49                   'actions': [
50                     {
51                       'action_name': 'hardlink_pdb_to_output',
52                       'inputs': [
53                         # Not the pdb, since gyp doesn't know about it
54                         '$(OutDir)\\initial\\chrome.dll',
55                       ],
56                       'outputs': [
57                         '$(OutDir)\\chrome.dll.pdb',
58                       ],
59                       'action': ['tools\\build\\win\\hardlink_failsafe.bat',
60                                  '$(OutDir)\\initial\\chrome.dll.pdb',
61                                  '$(OutDir)\\chrome.dll.pdb'],
62                       'msvs_cygwin_shell': 0,
63                     }
64                   ]
65                 }]
66               ],
67             }],
68           ]
69         },
70         {
71           'target_name': 'chrome_main_dll',
72           'type': 'shared_library',
73           'variables': {
74             'enable_wexit_time_destructors': 1,
75           },
76           'dependencies': [
77             '<@(chromium_dependencies)',
78             'app/policy/cloud_policy_codegen.gyp:policy',
79           ],
80           'conditions': [
81             ['use_aura==1', {
82               'dependencies': [
83                 '../ui/compositor/compositor.gyp:compositor',
84               ],
85             }],
86             ['use_ash==1', {
87               'sources': [
88                 '<(SHARED_INTERMEDIATE_DIR)/ash/ash_resources/ash_wallpaper_resources.rc',
89               ],
90             }],
91             ['OS=="win"', {
92               'product_name': 'chrome',
93               'dependencies': [
94                 # On Windows, link the dependencies (libraries) that make
95                 # up actual Chromium functionality into this .dll.
96                 'chrome_resources.gyp:chrome_resources',
97                 'chrome_version_resources',
98                 '../chrome/chrome_resources.gyp:chrome_unscaled_resources',
99                 '../content/content.gyp:content_worker',
100                 '../crypto/crypto.gyp:crypto',
101                 '../printing/printing.gyp:printing',
102                 '../net/net.gyp:net_resources',
103                 '../third_party/cld/cld.gyp:cld',
104                 '../ui/views/views.gyp:views',
105                 '../webkit/support/webkit_support.gyp:webkit_resources',
106               ],
107               'sources': [
108                 'app/chrome_command_ids.h',
109                 'app/chrome_dll.rc',
110                 'app/chrome_dll_resource.h',
111                 'app/chrome_main.cc',
112                 'app/chrome_main_delegate.cc',
113                 'app/chrome_main_delegate.h',
115                 '<(SHARED_INTERMEDIATE_DIR)/chrome_version/chrome_dll_version.rc',
116                 '../base/win/dllmain.cc',
118                 '../webkit/glue/resources/aliasb.cur',
119                 '../webkit/glue/resources/cell.cur',
120                 '../webkit/glue/resources/col_resize.cur',
121                 '../webkit/glue/resources/copy.cur',
122                 '../webkit/glue/resources/none.cur',
123                 '../webkit/glue/resources/row_resize.cur',
124                 '../webkit/glue/resources/vertical_text.cur',
125                 '../webkit/glue/resources/zoom_in.cur',
126                 '../webkit/glue/resources/zoom_out.cur',
128                 # TODO:  It would be nice to have these pulled in
129                 # automatically from direct_dependent_settings in
130                 # their various targets (net.gyp:net_resources, etc.),
131                 # but that causes errors in other targets when
132                 # resulting .res files get referenced multiple times.
133                 '<(SHARED_INTERMEDIATE_DIR)/chrome/browser_resources.rc',
134                 '<(SHARED_INTERMEDIATE_DIR)/chrome/chrome_unscaled_resources.rc',
135                 '<(SHARED_INTERMEDIATE_DIR)/chrome/common_resources.rc',
136                 '<(SHARED_INTERMEDIATE_DIR)/chrome/extensions_api_resources.rc',
137                 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.rc',
138                 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.rc',
139                 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.rc',
140                 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_unscaled_resources.rc',
142                 # TODO(sgk):  left-over from pre-gyp build, figure out
143                 # if we still need them and/or how to update to gyp.
144                 #'app/check_dependents.bat',
145                 #'app/chrome.dll.deps',
146               ],
147               'include_dirs': [
148                 '<(DEPTH)/third_party/wtl/include',
149               ],
150               'defines': [
151                 'CHROME_DLL',
152                 'BROWSER_DLL',
153                 'RENDERER_DLL',
154                 'PLUGIN_DLL',
155               ],
156               'configurations': {
157                 'Debug_Base': {
158                   'msvs_settings': {
159                     'VCLinkerTool': {
160                       'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
161                     },
162                   },
163                 },
164               },
165               'msvs_settings': {
166                 'VCLinkerTool': {
167                   'AdditionalLibraryDirectories': ['$(DXSDK_DIR)/lib/x86'],
168                   'BaseAddress': '0x01c30000',
169                   'ImportLibrary': '$(OutDir)\\lib\\chrome_dll.lib',
170                   # Set /SUBSYSTEM:WINDOWS for chrome.dll (for consistency).
171                   'SubSystem': '2',
172                   'conditions': [
173                     ['incremental_chrome_dll==1', {
174                       'OutputFile': '$(OutDir)\\initial\\chrome.dll',
175                       'UseLibraryDependencyInputs': "true",
176                     }],
177                   ],
178                   'DelayLoadDLLs': [
179                     'comdlg32.dll',
180                     'crypt32.dll',
181                     'cryptui.dll',
182                     'dhcpcsvc.dll',
183                     'imagehlp.dll',
184                     'imm32.dll',
185                     'iphlpapi.dll',
186                     'setupapi.dll',
187                     'urlmon.dll',
188                     'winhttp.dll',
189                     'wininet.dll',
190                     'winspool.drv',
191                     'ws2_32.dll',
192                     'wsock32.dll',
193                   ],
194                 },
195                 'VCManifestTool': {
196                   'AdditionalManifestFiles': '$(ProjectDir)\\app\\chrome.dll.manifest',
197                 },
198               },
199             }],  # OS=="win"
200             ['OS=="mac" and component!="shared_library"', {
201               'includes': [ 'chrome_dll_bundle.gypi' ],
202             }],
203             ['OS=="mac" and component=="shared_library"', {
204               'xcode_settings': { 'OTHER_LDFLAGS': [ '-Wl,-ObjC' ], },
205             }],
206             ['OS=="mac"', {
207               'xcode_settings': {
208                 # Define the order of symbols within the framework.  This
209                 # sets -order_file.
210                 'ORDER_FILE': 'app/framework.order',
211               },
212               'sources': [
213                 'app/chrome_command_ids.h',
214                 'app/chrome_dll_resource.h',
215                 'app/chrome_main.cc',
216                 'app/chrome_main_delegate.cc',
217                 'app/chrome_main_delegate.h',
218                 'app/chrome_main_app_mode_mac.mm',
219                 'app/chrome_main_mac.mm',
220                 'app/chrome_main_mac.h',
221               ],
222               'include_dirs': [
223                 '<(grit_out_dir)',
224               ],
225               'postbuilds': [
226                 {
227                   # This step causes an error to be raised if the .order file
228                   # does not account for all global text symbols.  It
229                   # validates the completeness of the .order file.
230                   'postbuild_name': 'Verify global text symbol order',
231                   'variables': {
232                     'verify_order_path': 'tools/build/mac/verify_order',
233                   },
234                   'action': [
235                     '<(verify_order_path)',
236                     '_ChromeMain',
237                     '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}',
238                   ],
239                 },
240               ],
241               'conditions': [
242                 ['mac_breakpad_compiled_in==1', {
243                   'dependencies': [
244                     '../breakpad/breakpad.gyp:breakpad',
245                     'app/policy/cloud_policy_codegen.gyp:policy',
246                   ],
247                   'sources': [
248                     'app/breakpad_mac.mm',
249                     'app/breakpad_mac.h',
250                   ],
251                 }, {  # else: mac_breakpad_compiled_in!=1
252                   # No Breakpad, put in the stubs.
253                   'sources': [
254                     'app/breakpad_mac_stubs.mm',
255                     'app/breakpad_mac.h',
256                   ],
257                 }],  # mac_breakpad_compiled_in
258                 ['internal_pdf', {
259                   'dependencies': [
260                     '../pdf/pdf.gyp:pdf',
261                   ],
262                 }],
263               ],  # conditions
264             }],  # OS=="mac"
265           ],  # conditions
266         },  # target chrome_dll
267       ],  # targets
268     }],  # OS=="mac" or OS=="win"
269   ],