Reland of move 1 ms rounding up of task delays on Windows (patchset #1 id:1 of https...
[chromium-blink-merge.git] / ppapi / ppapi_internal.gyp
blob042ed444dfb5d8b3f3b9c31e4efec2b129f944cb
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/shared_impl and //ppapi/thunk
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/surface/surface.gyp:surface',
57         '../url/url.gyp:url_lib',
58         'ppapi.gyp:ppapi_c',
59       ],
60       'export_dependent_settings': [
61         '../base/base.gyp:base',
62       ],
63       'conditions': [
64         ['OS=="mac"', {
65           'link_settings': {
66             'libraries': [
67               '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
68             ],
69           },
70         }],
71       ],
72     },
73   ],
74   'conditions': [
75     ['component=="static_library"', {
76       # In a static build, build ppapi_ipc separately.
77       'targets': [
78         {
79           # GN version: //ppapi/proxy:ipc
80           'target_name': 'ppapi_ipc',
81           'type': 'static_library',
82           'variables': {
83             'ppapi_ipc_target': 1,
84           },
85           'dependencies': [
86             '../base/base.gyp:base',
87             '../gpu/gpu.gyp:gpu_ipc',
88             '../ipc/ipc.gyp:ipc',
89             '../skia/skia.gyp:skia',
90             'ppapi.gyp:ppapi_c',
91             'ppapi_shared',
92           ],
93           'all_dependent_settings': {
94             'include_dirs': [
95                 '..',
96             ],
97           },
98         },
99         {
100           # GN version: //ppapi/proxy
101           'target_name': 'ppapi_proxy',
102           'type': 'static_library',
103           'variables': {
104             'ppapi_proxy_target': 1,
105           },
106           'dependencies': [
107             '../base/base.gyp:base',
108             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
109             '../gin/gin.gyp:gin',
110             '../gpu/gpu.gyp:gles2_implementation',
111             '../gpu/gpu.gyp:gpu_ipc',
112             '../media/media.gyp:shared_memory_support',
113             '../ipc/ipc.gyp:ipc',
114             '../skia/skia.gyp:skia',
115             '../third_party/icu/icu.gyp:icuuc',
116             '../third_party/icu/icu.gyp:icui18n',
117             '../ui/surface/surface.gyp:surface',
118             'ppapi.gyp:ppapi_c',
119             'ppapi_shared',
120             'ppapi_ipc',
121           ],
122           'all_dependent_settings': {
123             'include_dirs': [
124                 '..',
125             ],
126           },
127           'conditions': [
128             ['chrome_multiple_dll==1', {
129               'dependencies': [
130                 '../third_party/WebKit/public/blink.gyp:blink_minimal',
131               ],
132             }, {
133               'dependencies': [
134                 '../third_party/WebKit/public/blink.gyp:blink',
135               ],
136             }],
137           ],
138         },
139       ],
140     },
141     { # component != static_library
142       # In the component build, we'll just build ppapi_ipc in to ppapi_proxy.
143       'targets': [
144         {
145           # GN version: //ppapi:ppapi_proxy
146           'target_name': 'ppapi_proxy',
147           'type': 'shared_library',
148           'variables': {
149             # Setting both variables means we pull in the sources from both
150             # ppapi_ipc.gypi and ppapi_proxy.gypi.
151             'ppapi_ipc_target': 1,
152             'ppapi_proxy_target': 1,
153           },
154           'dependencies': [
155             '../base/base.gyp:base',
156             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
157             '../gin/gin.gyp:gin',
158             '../gpu/gpu.gyp:gles2_implementation',
159             '../gpu/gpu.gyp:gpu_ipc',
160             '../media/media.gyp:shared_memory_support',
161             '../ipc/ipc.gyp:ipc',
162             '../skia/skia.gyp:skia',
163             '../third_party/icu/icu.gyp:icuuc',
164             '../third_party/icu/icu.gyp:icui18n',
165             '../ui/surface/surface.gyp:surface',
166             'ppapi.gyp:ppapi_c',
167             'ppapi_shared',
168           ],
169           'all_dependent_settings': {
170             'include_dirs': [
171                 '..',
172             ],
173           },
174           'conditions': [
175             ['chrome_multiple_dll==1', {
176               'dependencies': [
177                 '../third_party/WebKit/public/blink.gyp:blink_minimal',
178               ],
179             }, {
180               'dependencies': [
181                 '../third_party/WebKit/public/blink.gyp:blink',
182               ],
183             }],
184           ],
185         },
186         {
187           # In component build, this is just a phony target that makes sure
188           # ppapi_proxy is built, since that's where the ipc sources go in the
189           # component build.
190           'target_name': 'ppapi_ipc',
191           'type': 'none',
192           'dependencies': [
193             'ppapi_proxy',
194           ],
195         },
196       ],
197     }],
198     ['disable_nacl!=1 and OS=="win" and target_arch=="ia32"', {
199       # In windows builds, we also want to define some targets to build in
200       # 64-bit mode for use by nacl64.exe (the NaCl helper process for 64-bit
201       # Windows).
202       'targets': [
203         {
204           # GN version: //ppapi:ppapi_shared
205           # (Should be automagical when compiling in the 64-bit toolchain.)
206           'target_name': 'ppapi_shared_win64',
207           'type': '<(component)',
208           'variables': {
209             'nacl_win64_target': 1,
210             'ppapi_shared_target': 1,
211           },
212           'dependencies': [
213             'ppapi.gyp:ppapi_c',
214             '../base/base.gyp:base_win64',
215             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64',
216             '../gpu/gpu.gyp:command_buffer_common_win64',
217             '../ipc/ipc.gyp:ipc_win64',
218           ],
219           'defines': [
220             '<@(nacl_win64_defines)',
221           ],
222           'export_dependent_settings': [
223             '../base/base.gyp:base_win64',
224           ],
225           'configurations': {
226             'Common_Base': {
227               'msvs_target_platform': 'x64',
228             },
229           },
230         },
231         {
232           # GN version: //ppapi:ppapi_ipc
233           # (Should be automagical when compiling in the 64-bit toolchain.)
234           'target_name': 'ppapi_ipc_win64',
235           'type': 'static_library',
236           'variables': {
237             'nacl_win64_target': 1,
238             'ppapi_ipc_target': 1,
239           },
240           'dependencies': [
241             '../base/base.gyp:base_win64',
242             '../ipc/ipc.gyp:ipc_win64',
243             '../gpu/gpu.gyp:gpu_ipc_win64',
244             'ppapi.gyp:ppapi_c',
245             'ppapi_shared_win64',
246           ],
247           'export_dependent_settings': [
248             '../gpu/gpu.gyp:gpu_ipc_win64',
249           ],
250           'defines': [
251             '<@(nacl_win64_defines)',
252           ],
253           'all_dependent_settings': {
254             'include_dirs': [
255                '..',
256             ],
257           },
258           'configurations': {
259             'Common_Base': {
260               'msvs_target_platform': 'x64',
261             },
262           },
263       }],
264     }],
265   ],