cc: Stretch textures by .5 texels to prevent out of bounds sampling
[chromium-blink-merge.git] / ppapi / ppapi_internal.gyp
blob821479d4e7da873f0557a047880c659b9906fbf9
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         'ppapi.gyp:ppapi_c',
46         '../base/base.gyp:base',
47         '../base/base.gyp:base_i18n',
48         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
49         '../build/temp_gyp/googleurl.gyp:googleurl',
50         '../gpu/command_buffer/command_buffer.gyp:gles2_utils',
51         '../gpu/gpu.gyp:command_buffer_client',
52         '../gpu/gpu.gyp:gles2_implementation',
53         '../media/media.gyp:shared_memory_support',
54         '../skia/skia.gyp:skia',
55         '../third_party/icu/icu.gyp:icuuc',
56         # TODO(ananta) : The WebKit dependency needs to move to a new target for NACL.
57         '<(webkit_src_dir)/Source/WebKit/chromium/WebKit.gyp:webkit',
58         '../ui/surface/surface.gyp:surface',
59       ],
60       'export_dependent_settings': [
61         '../base/base.gyp:base',
62         '<(webkit_src_dir)/Source/WebKit/chromium/WebKit.gyp:webkit',
63       ],
64       'conditions': [
65         ['OS=="mac"', {
66           'link_settings': {
67             'libraries': [
68               '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
69             ],
70           },
71         }],
72       ],
73       # Disable c4267 warnings until we fix size_t to int truncations.
74       'msvs_disabled_warnings': [ 4267, ],
75     },
76   ],
77   'conditions': [
78     ['component=="static_library"', {
79       # In a static build, build ppapi_ipc separately.
80       'targets': [
81         {
82           'target_name': 'ppapi_ipc',
83           'type': 'static_library',
84           'variables': {
85             'ppapi_ipc_target': 1,
86           },
87           'dependencies': [
88             '../base/base.gyp:base',
89             '../gpu/gpu.gyp:gpu_ipc',
90             '../ipc/ipc.gyp:ipc',
91             '../skia/skia.gyp:skia',
92             'ppapi.gyp:ppapi_c',
93             'ppapi_shared',
94           ],
95           'all_dependent_settings': {
96             'include_dirs': [
97                 '..',
98             ],
99           },
100         },
101         {
102           'target_name': 'ppapi_proxy',
103           'type': 'static_library',
104           'variables': {
105             'ppapi_proxy_target': 1,
106           },
107           'dependencies': [
108             '../base/base.gyp:base',
109             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
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             # TODO(ananta) : The WebKit dependency needs to move to a new target for NACL.
117             '<(webkit_src_dir)/Source/WebKit/chromium/WebKit.gyp:webkit',
118             '../ui/surface/surface.gyp:surface',
119             'ppapi.gyp:ppapi_c',
120             'ppapi_shared',
121             'ppapi_ipc',
122           ],
123           'all_dependent_settings': {
124             'include_dirs': [
125                 '..',
126             ],
127           },
128         },
129       ],
130     },
131     { # component != static_library
132       # In the component build, we'll just build ppapi_ipc in to ppapi_proxy.
133       'targets': [
134         {
135           'target_name': 'ppapi_proxy',
136           'type': 'shared_library',
137           'variables': {
138             # Setting both variables means we pull in the sources from both
139             # ppapi_ipc.gypi and ppapi_proxy.gypi.
140             'ppapi_ipc_target': 1,
141             'ppapi_proxy_target': 1,
142           },
143           'dependencies': [
144             '../base/base.gyp:base',
145             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
146             '../gpu/gpu.gyp:gles2_implementation',
147             '../gpu/gpu.gyp:gpu_ipc',
148             '../media/media.gyp:shared_memory_support',
149             '../ipc/ipc.gyp:ipc',
150             '../skia/skia.gyp:skia',
151             '../third_party/icu/icu.gyp:icuuc',
152             # TODO(ananta) : The WebKit dependency needs to move to a new target for NACL.
153             '<(webkit_src_dir)/Source/WebKit/chromium/WebKit.gyp:webkit',
154             '../ui/surface/surface.gyp:surface',
155             'ppapi.gyp:ppapi_c',
156             'ppapi_shared',
157           ],
158           'all_dependent_settings': {
159             'include_dirs': [
160                 '..',
161             ],
162           },
163           # Disable c4267 warnings until we fix size_t to int truncations.
164           'msvs_disabled_warnings': [ 4267, ],
165         },
166         {
167           # In component build, this is just a phony target that makes sure
168           # ppapi_proxy is built, since that's where the ipc sources go in the
169           # component build.
170           'target_name': 'ppapi_ipc',
171           'type': 'none',
172           'dependencies': [
173             'ppapi_proxy',
174           ],
175         },
176       ],
177     }],
178     ['disable_nacl!=1 and OS=="win" and target_arch=="ia32"', {
179       # In windows builds, we also want to define some targets to build in
180       # 64-bit mode for use by nacl64.exe (the NaCl helper process for 64-bit
181       # Windows).
182       'targets': [
183         {
184           'target_name': 'ppapi_shared_win64',
185           'type': '<(component)',
186           'variables': {
187             'nacl_win64_target': 1,
188             'ppapi_shared_target': 1,
189           },
190           'dependencies': [
191             'ppapi.gyp:ppapi_c',
192             '../base/base.gyp:base_nacl_win64',
193             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64',
194           ],
195           'defines': [
196             '<@(nacl_win64_defines)',
197           ],              
198           'export_dependent_settings': [
199             '../base/base.gyp:base_nacl_win64',
200           ],
201           'configurations': {
202             'Common_Base': {
203               'msvs_target_platform': 'x64',
204             },
205           },
206         },
207         {
208           'target_name': 'ppapi_ipc_win64',
209           'type': 'static_library',
210           'variables': {
211             'nacl_win64_target': 1,
212             'ppapi_ipc_target': 1,
213           },
214           'dependencies': [
215             '../base/base.gyp:base_nacl_win64',
216             '../ipc/ipc.gyp:ipc_win64',
217             '../gpu/gpu.gyp:gpu_ipc_win64',
218             'ppapi.gyp:ppapi_c',
219             'ppapi_shared_win64',
220           ],
221           'export_dependent_settings': [
222             '../gpu/gpu.gyp:gpu_ipc_win64',
223           ],
224           'defines': [
225             '<@(nacl_win64_defines)',
226           ],              
227           'all_dependent_settings': {
228             'include_dirs': [
229                '..',
230             ],
231           },
232           'configurations': {
233             'Common_Base': {
234               'msvs_target_platform': 'x64',
235             },
236           },
237       }],
238     }],
239   ],