cros: Show terminated/disabled app in launcher bar.
[chromium-blink-merge.git] / chrome / chrome_dll.gypi
blob65b70969d82a478cb8547a0aec1e05439442c59a
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           # This target is only depended upon on Windows.
72           'target_name': 'chrome_dll_pdb_workaround',
73           'type': 'static_library',
74           'sources': [ 'empty_pdb_workaround.cc' ],
75           'msvs_settings': {
76             'VCCLCompilerTool': {
77               # This *in the compile phase* must match the pdb name that's
78               # output by the final link. See empty_pdb_workaround.cc for
79               # more details.
80               'DebugInformationFormat': '3',
81               'ProgramDataBaseFileName': '<(PRODUCT_DIR)/chrome.dll.pdb',
82             },
83           },
84         },
85         {
86           'target_name': 'chrome_main_dll',
87           'type': 'shared_library',
88           'variables': {
89             'enable_wexit_time_destructors': 1,
90           },
91           'dependencies': [
92             '<@(chromium_dependencies)',
93             'app/policy/cloud_policy_codegen.gyp:policy',
94           ],
95           'conditions': [
96             ['use_aura==1', {
97               'dependencies': [
98                 '../ui/compositor/compositor.gyp:compositor',
99               ],
100             }],
101             ['use_ash==1', {
102               'sources': [
103                 '<(SHARED_INTERMEDIATE_DIR)/ash/ash_resources/ash_wallpaper_resources.rc',
104               ],
105             }],
106             ['OS=="win"', {
107               'product_name': 'chrome',
108               'dependencies': [
109                 # On Windows, link the dependencies (libraries) that make
110                 # up actual Chromium functionality into this .dll.
111                 'chrome_dll_pdb_workaround',
112                 'chrome_resources.gyp:chrome_resources',
113                 'chrome_version_resources',
114                 '../chrome/chrome_resources.gyp:chrome_unscaled_resources',
115                 '../content/content.gyp:content_worker',
116                 '../crypto/crypto.gyp:crypto',
117                 '../printing/printing.gyp:printing',
118                 '../net/net.gyp:net_resources',
119                 '../third_party/cld/cld.gyp:cld',
120                 '../ui/views/views.gyp:views',
121                 '../webkit/support/webkit_support.gyp:webkit_resources',
122               ],
123               'sources': [
124                 'app/chrome_command_ids.h',
125                 'app/chrome_dll.rc',
126                 'app/chrome_dll_resource.h',
127                 'app/chrome_main.cc',
128                 'app/chrome_main_delegate.cc',
129                 'app/chrome_main_delegate.h',
131                 '<(SHARED_INTERMEDIATE_DIR)/chrome_version/chrome_dll_version.rc',
132                 '../base/win/dllmain.cc',
134                 '../webkit/glue/resources/aliasb.cur',
135                 '../webkit/glue/resources/cell.cur',
136                 '../webkit/glue/resources/col_resize.cur',
137                 '../webkit/glue/resources/copy.cur',
138                 '../webkit/glue/resources/none.cur',
139                 '../webkit/glue/resources/row_resize.cur',
140                 '../webkit/glue/resources/vertical_text.cur',
141                 '../webkit/glue/resources/zoom_in.cur',
142                 '../webkit/glue/resources/zoom_out.cur',
144                 # TODO:  It would be nice to have these pulled in
145                 # automatically from direct_dependent_settings in
146                 # their various targets (net.gyp:net_resources, etc.),
147                 # but that causes errors in other targets when
148                 # resulting .res files get referenced multiple times.
149                 '<(SHARED_INTERMEDIATE_DIR)/chrome/browser_resources.rc',
150                 '<(SHARED_INTERMEDIATE_DIR)/chrome/chrome_unscaled_resources.rc',
151                 '<(SHARED_INTERMEDIATE_DIR)/chrome/common_resources.rc',
152                 '<(SHARED_INTERMEDIATE_DIR)/chrome/extensions_api_resources.rc',
153                 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.rc',
154                 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.rc',
155                 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.rc',
156                 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_unscaled_resources.rc',
158                 # TODO(sgk):  left-over from pre-gyp build, figure out
159                 # if we still need them and/or how to update to gyp.
160                 #'app/check_dependents.bat',
161                 #'app/chrome.dll.deps',
162               ],
163               'include_dirs': [
164                 '<(DEPTH)/third_party/wtl/include',
165               ],
166               'defines': [
167                 'CHROME_DLL',
168                 'BROWSER_DLL',
169                 'RENDERER_DLL',
170                 'PLUGIN_DLL',
171               ],
172               'configurations': {
173                 'Debug_Base': {
174                   'msvs_settings': {
175                     'VCLinkerTool': {
176                       'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
177                     },
178                   },
179                 },
180               },
181               'msvs_settings': {
182                 'VCLinkerTool': {
183                   'AdditionalLibraryDirectories': ['$(DXSDK_DIR)/lib/x86'],
184                   'BaseAddress': '0x01c30000',
185                   'ImportLibrary': '$(OutDir)\\lib\\chrome_dll.lib',
186                   # Set /SUBSYSTEM:WINDOWS for chrome.dll (for consistency).
187                   'SubSystem': '2',
188                   'conditions': [
189                     ['incremental_chrome_dll==1', {
190                       'OutputFile': '$(OutDir)\\initial\\chrome.dll',
191                       'UseLibraryDependencyInputs': "true",
192                     }],
193                   ],
194                   'DelayLoadDLLs': [
195                     'comdlg32.dll',
196                     'crypt32.dll',
197                     'cryptui.dll',
198                     'dhcpcsvc.dll',
199                     'imagehlp.dll',
200                     'imm32.dll',
201                     'iphlpapi.dll',
202                     'setupapi.dll',
203                     'urlmon.dll',
204                     'winhttp.dll',
205                     'wininet.dll',
206                     'winspool.drv',
207                     'ws2_32.dll',
208                     'wsock32.dll',
209                   ],
210                 },
211                 'VCManifestTool': {
212                   'AdditionalManifestFiles': '$(ProjectDir)\\app\\chrome.dll.manifest',
213                 },
214               },
215             }],  # OS=="win"
216             ['OS=="mac" and component!="shared_library"', {
217               'includes': [ 'chrome_dll_bundle.gypi' ],
218             }],
219             ['OS=="mac" and component=="shared_library"', {
220               'xcode_settings': { 'OTHER_LDFLAGS': [ '-Wl,-ObjC' ], },
221             }],
222             ['OS=="mac"', {
223               'xcode_settings': {
224                 # Define the order of symbols within the framework.  This
225                 # sets -order_file.
226                 'ORDER_FILE': 'app/framework.order',
227               },
228               'sources': [
229                 'app/chrome_command_ids.h',
230                 'app/chrome_dll_resource.h',
231                 'app/chrome_main.cc',
232                 'app/chrome_main_delegate.cc',
233                 'app/chrome_main_delegate.h',
234                 'app/chrome_main_app_mode_mac.mm',
235                 'app/chrome_main_mac.mm',
236                 'app/chrome_main_mac.h',
237               ],
238               'include_dirs': [
239                 '<(grit_out_dir)',
240               ],
241               'postbuilds': [
242                 {
243                   # This step causes an error to be raised if the .order file
244                   # does not account for all global text symbols.  It
245                   # validates the completeness of the .order file.
246                   'postbuild_name': 'Verify global text symbol order',
247                   'variables': {
248                     'verify_order_path': 'tools/build/mac/verify_order',
249                   },
250                   'action': [
251                     '<(verify_order_path)',
252                     '_ChromeMain',
253                     '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}',
254                   ],
255                 },
256               ],
257               'conditions': [
258                 ['mac_breakpad_compiled_in==1', {
259                   'dependencies': [
260                     '../breakpad/breakpad.gyp:breakpad',
261                     'app/policy/cloud_policy_codegen.gyp:policy',
262                   ],
263                   'sources': [
264                     'app/breakpad_mac.mm',
265                     'app/breakpad_mac.h',
266                   ],
267                 }, {  # else: mac_breakpad_compiled_in!=1
268                   # No Breakpad, put in the stubs.
269                   'sources': [
270                     'app/breakpad_mac_stubs.mm',
271                     'app/breakpad_mac.h',
272                   ],
273                 }],  # mac_breakpad_compiled_in
274                 ['internal_pdf', {
275                   'dependencies': [
276                     '../pdf/pdf.gyp:pdf',
277                   ],
278                 }],
279               ],  # conditions
280             }],  # OS=="mac"
281           ],  # conditions
282         },  # target chrome_dll
283       ],  # targets
284     }],  # OS=="mac" or OS=="win"
285   ],