chromeos: dbus: add Bluetooth properties support
[chromium-blink-merge.git] / content / content.gyp
blob29b2b4e2986d3b4c3af4c9c2bc542f15a7f76b2c
1 # Copyright (c) 2011 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.
6   'variables': {
7     'chromium_code': 1,  # Use higher warning level.
8     'directxsdk_exists': '<!(python <(DEPTH)/build/dir_exists.py ../third_party/directxsdk)',
9   },
10   'includes': [
11     '../build/win_precompile.gypi',
12     'content_shell.gypi',
13     'content_tests.gypi',
14   ],
15   'target_defaults': {
16     'defines': ['CONTENT_IMPLEMENTATION'],
17   },
18   'conditions': [
19    # In component mode, we build all of content as a single DLL.
20    # However, in the static mode, we need to build content as multiple
21    # targets in order to prevent dependencies from getting introduced
22    # upstream unnecessarily (e.g., content_renderer depends on allocator
23    # and chrome_exe depends on content_common but we don't want
24    # chrome_exe to have to depend on allocator).
25    ['component=="static_library" or incremental_chrome_dll==1', {
26      'target_defines': [
27        'COMPILE_CONTENT_STATICALLY',
28      ],
29      'targets': [
30       {'target_name': 'content',
31        'type': 'none',
32        'dependencies': [
33         'content_app',
34         'content_browser',
35         'content_common',
36         'content_gpu',
37         'content_plugin',
38         'content_ppapi_plugin',
39         'content_renderer',
40         'content_utility',
41         'content_worker',
42        ],
43       },
44       {'target_name': 'content_app',
45        'type': 'static_library',
46        'variables': { 'enable_wexit_time_destructors': 1, },
47        'includes': [
48           'content_app.gypi',
49         ],
50        'dependencies': [
51           'content_common',
52         ],
53       },
54       {'target_name': 'content_browser',
55        'type': 'static_library',
56        'variables': { 'enable_wexit_time_destructors': 1, },
57        'includes': [
58           'content_browser.gypi',
59         ],
60        'dependencies': [
61           'content_common',
62         ],
63       },
64       {'target_name': 'content_common',
65        'type': 'static_library',
66        'variables': { 'enable_wexit_time_destructors': 1, },
67        'includes': [
68           'content_common.gypi',
69         ],
70        'dependencies': [
71           'content_resources.gyp:content_resources',
72         ],
73       },
74       {'target_name': 'content_gpu',
75        'type': 'static_library',
76        'variables': { 'enable_wexit_time_destructors': 1, },
77        'includes': [
78           'content_gpu.gypi',
79         ],
80        'dependencies': [
81           'content_common',
82         ],
83       },
84       {'target_name': 'content_plugin',
85        'type': 'static_library',
86        'variables': { 'enable_wexit_time_destructors': 1, },
87        'includes': [
88           'content_plugin.gypi',
89         ],
90        'dependencies': [
91           'content_common',
92         ],
93       },
94       {'target_name': 'content_ppapi_plugin',
95        'type': 'static_library',
96        'variables': { 'enable_wexit_time_destructors': 1, },
97        'includes': [
98           'content_ppapi_plugin.gypi',
99         ],
100       },
101       {'target_name': 'content_renderer',
102        'type': 'static_library',
103        'variables': { 'enable_wexit_time_destructors': 1, },
104        'includes': [
105           'content_renderer.gypi',
106         ],
107        'dependencies': [
108           'content_common',
109           'content_resources.gyp:content_resources',
110         ],
111       },
112       {'target_name': 'content_utility',
113        'type': 'static_library',
114        'variables': { 'enable_wexit_time_destructors': 1, },
115        'includes': [
116           'content_utility.gypi',
117         ],
118        'dependencies': [
119           'content_common',
120         ],
121       },
122       {'target_name': 'content_worker',
123        'type': 'static_library',
124        'variables': { 'enable_wexit_time_destructors': 1, },
125        'includes': [
126           'content_worker.gypi',
127        ],
128        'dependencies': [
129           'content_common',
130         ],
131       },
132      ],
133     },
134     { # component != static_library
135      'targets': [
136       {'target_name': 'content',
137        'type': 'shared_library',
138        'variables': { 'enable_wexit_time_destructors': 1, },
139         'dependencies': [
140           'content_resources.gyp:content_resources',
141         ],
142        'includes': [
143         'content_app.gypi',
144         'content_browser.gypi',
145         'content_common.gypi',
146         'content_gpu.gypi',
147         'content_plugin.gypi',
148         'content_ppapi_plugin.gypi',
149         'content_renderer.gypi',
150         'content_utility.gypi',
151         'content_worker.gypi',
152        ],
153       },
154       {'target_name': 'content_app',
155        'type': 'none',
156        'dependencies': ['content', 'content_browser'],
157       },
158       {'target_name': 'content_browser',
159        'type': 'none',
160        'dependencies': ['content'],
161       },
162       {'target_name': 'content_common',
163        'type': 'none',
164        'dependencies': ['content', 'content_resources.gyp:content_resources'],
165       },
166       {'target_name': 'content_gpu',
167        'type': 'none',
168        'dependencies': ['content'],
169       },
170       {'target_name': 'content_plugin',
171        'type': 'none',
172        'dependencies': ['content'],
173       },
174       {'target_name': 'content_ppapi_plugin',
175        'type': 'none',
176        'dependencies': ['content'],
177       },
178       {'target_name': 'content_renderer',
179        'type': 'none',
180        'dependencies': ['content'],
181       },
182       {'target_name': 'content_utility',
183        'type': 'none',
184        'dependencies': ['content'],
185       },
186       {'target_name': 'content_worker',
187        'type': 'none',
188        'dependencies': ['content'],
189       },
190      ],
191     },
192    ],
193    ['OS=="mac"', {
194      'targets': [
195        {
196          'target_name': 'closure_blocks_leopard_compat',
197          'defines!': ['CONTENT_IMPLEMENTATION'],
198          'sources': [
199            'browser/mac/closure_blocks_leopard_compat.h',
200          ],
201          'conditions': [
202            ['mac_sdk == "10.5"', {
203              'type': 'shared_library',
204              'product_name': 'closure_blocks_leopard_compat_stub',
205              'variables': {
206                # This target controls stripping directly. See below.
207                'mac_strip': 0,
208              },
209              'sources': [
210                'browser/mac/closure_blocks_leopard_compat.S',
211              ],
212              'xcode_settings': {
213                # These values are taken from libSystem.dylib in the 10.5
214                # SDK. Setting LD_DYLIB_INSTALL_NAME causes anything linked
215                # against this stub library to look for the symbols it
216                # provides in the real libSystem at runtime. When using ld
217                # from Xcode 4 or later (ld64-123.2 and up), giving two
218                # libraries with the same "install name" to the linker will
219                # cause it to print "ld: warning: dylibs with same install
220                # name". This is harmless, and ld will behave as intended
221                # here.
222                #
223                # The real library's compatibility version is used, and the
224                # value of the current version from the SDK is used to make
225                # it appear as though anything linked against this stub was
226                # linked against the real thing.
227                'LD_DYLIB_INSTALL_NAME': '/usr/lib/libSystem.B.dylib',
228                'DYLIB_COMPATIBILITY_VERSION': '1.0.0',
229                'DYLIB_CURRENT_VERSION': '111.1.4',
231                # Turn on stripping (yes, even in debug mode), and add the -c
232                # flag. This is what produces a stub library (MH_DYLIB_STUB)
233                # as opposed to a dylib (MH_DYLIB). MH_DYLIB_STUB files
234                # contain symbol tables and everything else needed for
235                # linking, but are stripped of section contents. This is the
236                # same way that the stub libraries in Mac OS X SDKs are
237                # created. dyld will refuse to load a stub library, so this
238                # provides some insurance in case anyone tries to load the
239                # stub at runtime.
240                'DEPLOYMENT_POSTPROCESSING': 'YES',
241                'STRIP_STYLE': 'non-global',
242                'STRIPFLAGS': '-c',
243              },
244            }, {  # else: mac_sdk != "10.5"
245              # When using the 10.6 SDK or newer, the necessary definitions
246              # are already present in libSystem.dylib. There is no need to
247              # build a stub dylib to provide these symbols at link time.
248              # This target is still useful to cause those symbols to be
249              # treated as weak imports in dependents, who still must
250              # #include closure_blocks_leopard_compat.h to get weak imports.
251              'type': 'none',
252            }],
253          ],
254        },
255      ],
256    }],
257   ],