Revert 251029 "Move Windows-specific code into NativeAppWindowVi..."
[chromium-blink-merge.git] / ppapi / ppapi_internal.gyp
blob989a5915f63d534abb3ff9a785a5915a9ced7860
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       'target_name': 'ppapi_shared',
37       'type': '<(component)',
38       'variables': {
39         # Set the ppapi_shared_target variable, so that we will pull in the
40         # sources from ppapi_shared.gypi (and only from there). We follow the
41         # same pattern for the other targets defined within this file.
42         'ppapi_shared_target': 1,
43       },
44       'dependencies': [
45         '../base/base.gyp:base',
46         '../base/base.gyp:base_i18n',
47         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
48         '../gpu/command_buffer/command_buffer.gyp:gles2_utils',
49         '../gpu/gpu.gyp:command_buffer_client',
50         '../gpu/gpu.gyp:gles2_implementation',
51         '../ipc/ipc.gyp:ipc',
52         '../media/media.gyp:shared_memory_support',
53         '../skia/skia.gyp:skia',
54         '../third_party/icu/icu.gyp:icuuc',
55         '../ui/surface/surface.gyp:surface',
56         '../url/url.gyp:url_lib',
57         'ppapi.gyp:ppapi_c',
58       ],
59       'export_dependent_settings': [
60         '../base/base.gyp:base',
61       ],
62       'conditions': [
63         ['OS=="mac"', {
64           'link_settings': {
65             'libraries': [
66               '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
67             ],
68           },
69         }],
70         ['chrome_multiple_dll==1', {
71           'dependencies': [
72             '../third_party/WebKit/public/blink.gyp:blink_minimal',
73           ],
74           'export_dependent_settings': [
75             '../third_party/WebKit/public/blink.gyp:blink_minimal',
76           ],
77         }, {
78           'dependencies': [
79             '../third_party/WebKit/public/blink.gyp:blink',
80           ],
81           'export_dependent_settings': [
82             '../third_party/WebKit/public/blink.gyp:blink',
83           ],
84         }],
85       ],
86       # Disable c4267 warnings until we fix size_t to int truncations.
87       'msvs_disabled_warnings': [ 4267, ],
88     },
89   ],
90   'conditions': [
91     ['component=="static_library"', {
92       # In a static build, build ppapi_ipc separately.
93       'targets': [
94         {
95           'target_name': 'ppapi_ipc',
96           'type': 'static_library',
97           'variables': {
98             'ppapi_ipc_target': 1,
99           },
100           'dependencies': [
101             '../base/base.gyp:base',
102             '../gpu/gpu.gyp:gpu_ipc',
103             '../ipc/ipc.gyp:ipc',
104             '../skia/skia.gyp:skia',
105             'ppapi.gyp:ppapi_c',
106             'ppapi_shared',
107           ],
108           'all_dependent_settings': {
109             'include_dirs': [
110                 '..',
111             ],
112           },
113         },
114         {
115           'target_name': 'ppapi_proxy',
116           'type': 'static_library',
117           'variables': {
118             'ppapi_proxy_target': 1,
119           },
120           'dependencies': [
121             '../base/base.gyp:base',
122             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
123             '../gpu/gpu.gyp:gles2_implementation',
124             '../gpu/gpu.gyp:gpu_ipc',
125             '../media/media.gyp:shared_memory_support',
126             '../ipc/ipc.gyp:ipc',
127             '../skia/skia.gyp:skia',
128             '../third_party/icu/icu.gyp:icuuc',
129             '../third_party/icu/icu.gyp:icui18n',
130             '../ui/surface/surface.gyp:surface',
131             'ppapi.gyp:ppapi_c',
132             'ppapi_shared',
133             'ppapi_ipc',
134           ],
135           'all_dependent_settings': {
136             'include_dirs': [
137                 '..',
138             ],
139           },
140           # Disable c4267 warnings until we fix size_t to int truncations.
141           'msvs_disabled_warnings': [ 4267, ],
142           'conditions': [
143             ['chrome_multiple_dll==1', {
144               'dependencies': [
145                 '../third_party/WebKit/public/blink.gyp:blink_minimal',
146               ],
147             }, {
148               'dependencies': [
149                 '../third_party/WebKit/public/blink.gyp:blink',
150               ],
151             }],
152           ],
153         },
154       ],
155     },
156     { # component != static_library
157       # In the component build, we'll just build ppapi_ipc in to ppapi_proxy.
158       'targets': [
159         {
160           'target_name': 'ppapi_proxy',
161           'type': 'shared_library',
162           'variables': {
163             # Setting both variables means we pull in the sources from both
164             # ppapi_ipc.gypi and ppapi_proxy.gypi.
165             'ppapi_ipc_target': 1,
166             'ppapi_proxy_target': 1,
167           },
168           'dependencies': [
169             '../base/base.gyp:base',
170             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
171             '../gpu/gpu.gyp:gles2_implementation',
172             '../gpu/gpu.gyp:gpu_ipc',
173             '../media/media.gyp:shared_memory_support',
174             '../ipc/ipc.gyp:ipc',
175             '../skia/skia.gyp:skia',
176             '../third_party/icu/icu.gyp:icuuc',
177             '../third_party/icu/icu.gyp:icui18n',
178             '../ui/surface/surface.gyp:surface',
179             'ppapi.gyp:ppapi_c',
180             'ppapi_shared',
181           ],
182           'all_dependent_settings': {
183             'include_dirs': [
184                 '..',
185             ],
186           },
187           # Disable c4267 warnings until we fix size_t to int truncations.
188           'msvs_disabled_warnings': [ 4267, ],
189           'conditions': [
190             ['chrome_multiple_dll==1', {
191               'dependencies': [
192                 '../third_party/WebKit/public/blink.gyp:blink_minimal',
193               ],
194             }, {
195               'dependencies': [
196                 '../third_party/WebKit/public/blink.gyp:blink',
197               ],
198             }],
199           ],
200         },
201         {
202           # In component build, this is just a phony target that makes sure
203           # ppapi_proxy is built, since that's where the ipc sources go in the
204           # component build.
205           'target_name': 'ppapi_ipc',
206           'type': 'none',
207           'dependencies': [
208             'ppapi_proxy',
209           ],
210         },
211       ],
212     }],
213     ['disable_nacl!=1 and OS=="win" and target_arch=="ia32"', {
214       # In windows builds, we also want to define some targets to build in
215       # 64-bit mode for use by nacl64.exe (the NaCl helper process for 64-bit
216       # Windows).
217       'targets': [
218         {
219           'target_name': 'ppapi_shared_win64',
220           'type': '<(component)',
221           'variables': {
222             'nacl_win64_target': 1,
223             'ppapi_shared_target': 1,
224           },
225           'dependencies': [
226             'ppapi.gyp:ppapi_c',
227             '../base/base.gyp:base_win64',
228             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64',
229             '../ipc/ipc.gyp:ipc_win64',
230           ],
231           'defines': [
232             '<@(nacl_win64_defines)',
233           ],              
234           'export_dependent_settings': [
235             '../base/base.gyp:base_win64',
236           ],
237           'configurations': {
238             'Common_Base': {
239               'msvs_target_platform': 'x64',
240             },
241           },
242         },
243         {
244           'target_name': 'ppapi_ipc_win64',
245           'type': 'static_library',
246           'variables': {
247             'nacl_win64_target': 1,
248             'ppapi_ipc_target': 1,
249           },
250           'dependencies': [
251             '../base/base.gyp:base_win64',
252             '../ipc/ipc.gyp:ipc_win64',
253             '../gpu/gpu.gyp:gpu_ipc_win64',
254             'ppapi.gyp:ppapi_c',
255             'ppapi_shared_win64',
256           ],
257           'export_dependent_settings': [
258             '../gpu/gpu.gyp:gpu_ipc_win64',
259           ],
260           'defines': [
261             '<@(nacl_win64_defines)',
262           ],              
263           'all_dependent_settings': {
264             'include_dirs': [
265                '..',
266             ],
267           },
268           'configurations': {
269             'Common_Base': {
270               'msvs_target_platform': 'x64',
271             },
272           },
273       }],
274     }],
275   ],