Roll src/third_party/skia d39c191:cd523eb
[chromium-blink-merge.git] / ppapi / ppapi_internal.gyp
blobb58f2128faef916d37fba6e6ad3052ec1af6af4a
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.
6   'variables': {
7     'chromium_code': 1,  # Use higher warning level.
8   },
9   'target_defaults': {
10     'conditions': [
11       # Linux shared libraries should always be built -fPIC.
12       #
13       # TODO(ajwong): For internal pepper plugins, which are statically linked
14       # into chrome, do we want to build w/o -fPIC?  If so, how can we express
15       # that in the build system?
16       ['os_posix==1 and OS!="android" and OS!="mac"', {
17         'cflags': ['-fPIC', '-fvisibility=hidden'],
19         # This is needed to make the Linux shlib build happy. Without this,
20         # -fvisibility=hidden gets stripped by the exclusion in common.gypi
21         # that is triggered when a shared library build is specified.
22         'cflags/': [['include', '^-fvisibility=hidden$']],
23       }],
24     ],
25   },
26   'includes': [
27     'ppapi_sources.gypi',
28     'ppapi_host.gypi',
29     'ppapi_ipc.gypi',
30     'ppapi_proxy.gypi',
31     'ppapi_shared.gypi',
32     'ppapi_tests.gypi',
33   ],
34   'targets': [
35     {
36       # GN version: //ppapi:ppapi_shared
37       'target_name': 'ppapi_shared',
38       'type': '<(component)',
39       'variables': {
40         # Set the ppapi_shared_target variable, so that we will pull in the
41         # sources from ppapi_shared.gypi (and only from there). We follow the
42         # same pattern for the other targets defined within this file.
43         'ppapi_shared_target': 1,
44       },
45       'dependencies': [
46         '../base/base.gyp:base',
47         '../base/base.gyp:base_i18n',
48         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
49         '../gpu/command_buffer/command_buffer.gyp:gles2_utils',
50         '../gpu/gpu.gyp:command_buffer_client',
51         '../gpu/gpu.gyp:gles2_implementation',
52         '../ipc/ipc.gyp:ipc',
53         '../media/media.gyp:shared_memory_support',
54         '../skia/skia.gyp:skia',
55         '../third_party/icu/icu.gyp:icuuc',
56         '../ui/events/events.gyp:events_base',
57         '../ui/surface/surface.gyp:surface',
58         '../url/url.gyp:url_lib',
59         'ppapi.gyp:ppapi_c',
60       ],
61       'export_dependent_settings': [
62         '../base/base.gyp:base',
63       ],
64       'conditions': [
65         ['OS=="mac"', {
66           'link_settings': {
67             'libraries': [
68               '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
69             ],
70           },
71         }],
72         ['chrome_multiple_dll==1', {
73           'dependencies': [
74             '../third_party/WebKit/public/blink.gyp:blink_minimal',
75           ],
76           'export_dependent_settings': [
77             '../third_party/WebKit/public/blink.gyp:blink_minimal',
78           ],
79         }, {
80           'dependencies': [
81             '../third_party/WebKit/public/blink.gyp:blink',
82           ],
83           'export_dependent_settings': [
84             '../third_party/WebKit/public/blink.gyp:blink',
85           ],
86         }],
87       ],
88       # Disable c4267 warnings until we fix size_t to int truncations.
89       'msvs_disabled_warnings': [ 4267, ],
90     },
91   ],
92   'conditions': [
93     ['component=="static_library"', {
94       # In a static build, build ppapi_ipc separately.
95       'targets': [
96         {
97           # GN version: //ppapi:ppapi_ipc
98           'target_name': 'ppapi_ipc',
99           'type': 'static_library',
100           'variables': {
101             'ppapi_ipc_target': 1,
102           },
103           'dependencies': [
104             '../base/base.gyp:base',
105             '../gpu/gpu.gyp:gpu_ipc',
106             '../ipc/ipc.gyp:ipc',
107             '../skia/skia.gyp:skia',
108             '../ui/events/ipc/events_ipc.gyp:events_ipc',
109             'ppapi.gyp:ppapi_c',
110             'ppapi_shared',
111           ],
112           'all_dependent_settings': {
113             'include_dirs': [
114                 '..',
115             ],
116           },
117         },
118         {
119           # GN version: //ppapi:ppapi_proxy
120           'target_name': 'ppapi_proxy',
121           'type': 'static_library',
122           'variables': {
123             'ppapi_proxy_target': 1,
124           },
125           'dependencies': [
126             '../base/base.gyp:base',
127             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
128             '../gpu/gpu.gyp:gles2_implementation',
129             '../gpu/gpu.gyp:gpu_ipc',
130             '../media/media.gyp:shared_memory_support',
131             '../ipc/ipc.gyp:ipc',
132             '../skia/skia.gyp:skia',
133             '../third_party/icu/icu.gyp:icuuc',
134             '../third_party/icu/icu.gyp:icui18n',
135             '../ui/events/events.gyp:events_base',
136             '../ui/surface/surface.gyp:surface',
137             'ppapi.gyp:ppapi_c',
138             'ppapi_shared',
139             'ppapi_ipc',
140           ],
141           'all_dependent_settings': {
142             'include_dirs': [
143                 '..',
144             ],
145           },
146           # Disable c4267 warnings until we fix size_t to int truncations.
147           'msvs_disabled_warnings': [ 4267, ],
148           'conditions': [
149             ['chrome_multiple_dll==1', {
150               'dependencies': [
151                 '../third_party/WebKit/public/blink.gyp:blink_minimal',
152               ],
153             }, {
154               'dependencies': [
155                 '../third_party/WebKit/public/blink.gyp:blink',
156               ],
157             }],
158           ],
159         },
160       ],
161     },
162     { # component != static_library
163       # In the component build, we'll just build ppapi_ipc in to ppapi_proxy.
164       'targets': [
165         {
166           # GN version: //ppapi:ppapi_proxy
167           'target_name': 'ppapi_proxy',
168           'type': 'shared_library',
169           'variables': {
170             # Setting both variables means we pull in the sources from both
171             # ppapi_ipc.gypi and ppapi_proxy.gypi.
172             'ppapi_ipc_target': 1,
173             'ppapi_proxy_target': 1,
174           },
175           'dependencies': [
176             '../base/base.gyp:base',
177             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
178             '../gpu/gpu.gyp:gles2_implementation',
179             '../gpu/gpu.gyp:gpu_ipc',
180             '../media/media.gyp:shared_memory_support',
181             '../ipc/ipc.gyp:ipc',
182             '../skia/skia.gyp:skia',
183             '../third_party/icu/icu.gyp:icuuc',
184             '../third_party/icu/icu.gyp:icui18n',
185             '../ui/events/events.gyp:events_base',
186             '../ui/events/ipc/events_ipc.gyp:events_ipc',
187             '../ui/surface/surface.gyp:surface',
188             'ppapi.gyp:ppapi_c',
189             'ppapi_shared',
190           ],
191           'all_dependent_settings': {
192             'include_dirs': [
193                 '..',
194             ],
195           },
196           # Disable c4267 warnings until we fix size_t to int truncations.
197           'msvs_disabled_warnings': [ 4267, ],
198           'conditions': [
199             ['chrome_multiple_dll==1', {
200               'dependencies': [
201                 '../third_party/WebKit/public/blink.gyp:blink_minimal',
202               ],
203             }, {
204               'dependencies': [
205                 '../third_party/WebKit/public/blink.gyp:blink',
206               ],
207             }],
208           ],
209         },
210         {
211           # In component build, this is just a phony target that makes sure
212           # ppapi_proxy is built, since that's where the ipc sources go in the
213           # component build.
214           'target_name': 'ppapi_ipc',
215           'type': 'none',
216           'dependencies': [
217             'ppapi_proxy',
218           ],
219         },
220       ],
221     }],
222     ['disable_nacl!=1 and OS=="win" and target_arch=="ia32"', {
223       # In windows builds, we also want to define some targets to build in
224       # 64-bit mode for use by nacl64.exe (the NaCl helper process for 64-bit
225       # Windows).
226       'targets': [
227         {
228           # GN version: //ppapi:ppapi_shared
229           # (Should be automagical when compiling in the 64-bit toolchain.)
230           'target_name': 'ppapi_shared_win64',
231           'type': '<(component)',
232           'variables': {
233             'nacl_win64_target': 1,
234             'ppapi_shared_target': 1,
235           },
236           'dependencies': [
237             'ppapi.gyp:ppapi_c',
238             '../base/base.gyp:base_win64',
239             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64',
240             '../gpu/gpu.gyp:command_buffer_common_win64',
241             '../ipc/ipc.gyp:ipc_win64',
242             '../ui/events/latency_info_nacl.gyp:latency_info_nacl_win64',
243           ],
244           'defines': [
245             '<@(nacl_win64_defines)',
246           ],              
247           'export_dependent_settings': [
248             '../base/base.gyp:base_win64',
249           ],
250           'configurations': {
251             'Common_Base': {
252               'msvs_target_platform': 'x64',
253             },
254           },
255         },
256         {
257           # GN version: //ppapi:ppapi_ipc
258           # (Should be automagical when compiling in the 64-bit toolchain.)
259           'target_name': 'ppapi_ipc_win64',
260           'type': 'static_library',
261           'variables': {
262             'nacl_win64_target': 1,
263             'ppapi_ipc_target': 1,
264           },
265           'dependencies': [
266             '../base/base.gyp:base_win64',
267             '../ipc/ipc.gyp:ipc_win64',
268             '../gpu/gpu.gyp:gpu_ipc_win64',
269             '../ui/events/latency_info_nacl.gyp:latency_info_nacl_win64',
270             'ppapi.gyp:ppapi_c',
271             'ppapi_shared_win64',
272           ],
273           'export_dependent_settings': [
274             '../gpu/gpu.gyp:gpu_ipc_win64',
275           ],
276           'defines': [
277             '<@(nacl_win64_defines)',
278           ],              
279           'all_dependent_settings': {
280             'include_dirs': [
281                '..',
282             ],
283           },
284           'configurations': {
285             'Common_Base': {
286               'msvs_target_platform': 'x64',
287             },
288           },
289       }],
290     }],
291   ],