Non-SFI mode: Clean up libevent_nacl_nonsfi.gyp.
[chromium-blink-merge.git] / skia / skia.gyp
blob2d2668a1d55c2805f8ff7ecf01dbd0f5046aea16
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   'conditions': [
7     # In component mode (shared_lib), we build all of skia as a single DLL.
8     # However, in the static mode, we need to build skia as multiple targets
9     # in order to support the use case where a platform (e.g. Android) may
10     # already have a copy of skia as a system library.
11     ['component=="static_library" and use_system_skia==0', {
12       'targets': [
13         {
14           'target_name': 'skia_library',
15           'type': 'static_library',
16           'includes': [
17             'skia_library.gypi',
18             'skia_common.gypi',
19             '../build/android/increase_size_for_speed.gypi',
20             # Disable LTO due to compiler error
21             # in mems_in_disjoint_alias_sets_p, at alias.c:393
22             # crbug.com/422255
23             '../build/android/disable_lto.gypi',
24           ],
25         },
26       ],
27     }],
28     ['component=="static_library" and use_system_skia==1', {
29       'targets': [
30         {
31           'target_name': 'skia_library',
32           'type': 'none',
33           'includes': [
34             'skia_system.gypi',
35             '../build/android/increase_size_for_speed.gypi',
36           ],
37         },
38       ],
39     }],
40     ['component=="static_library"', {
41       'targets': [
42         {
43           'target_name': 'skia',
44           'type': 'none',
45           'dependencies': [
46             'skia_library',
47             'skia_chrome',
48           ],
49           'export_dependent_settings': [
50             'skia_library',
51             'skia_chrome',
52           ],
53         },
54         {
55           'target_name': 'skia_chrome',
56           'type': 'static_library',
57           'includes': [
58             'skia_chrome.gypi',
59             'skia_common.gypi',
60             '../build/android/increase_size_for_speed.gypi',
61           ],
62         },
63       ],
64     },
65     {  # component != static_library
66       'targets': [
67         {
68           'target_name': 'skia',
69           'type': 'shared_library',
70           'includes': [
71             'skia_library.gypi',
72             'skia_chrome.gypi',
73             'skia_common.gypi',
74             '../build/android/increase_size_for_speed.gypi',
75           ],
76           'defines': [
77             'SKIA_DLL',
78             'SKIA_IMPLEMENTATION=1',
79             'GR_GL_IGNORE_ES3_MSAA=0',
80           ],
81           'direct_dependent_settings': {
82             'defines': [
83               'SKIA_DLL',
84               'GR_GL_IGNORE_ES3_MSAA=0',
85             ],
86           },
87         },
88         {
89           'target_name': 'skia_library',
90           'type': 'none',
91         },
92         {
93           'target_name': 'skia_chrome',
94           'type': 'none',
95         },
96       ],
97     }],
98   ],
100   # targets that are not dependent upon the component type
101   'targets': [
102     {
103       'target_name': 'skia_chrome_opts',
104       'type': 'static_library',
105       'include_dirs': [
106         '..',
107         'config',
108         '../third_party/skia/include/core',
109       ],
110       'conditions': [
111         [ 'os_posix == 1 and OS != "mac" and OS != "android" and \
112             target_arch != "arm" and target_arch != "mipsel" and \
113             target_arch != "arm64" and target_arch != "mips64el"', {
114           'cflags': [
115             '-msse2',
116           ],
117         }],
118         [ 'target_arch != "arm" and target_arch != "mipsel" and \
119            target_arch != "arm64" and target_arch != "mips64el"', {
120           'sources': [
121             'ext/convolver_SSE2.cc',
122           ],
123         }],
124         [ 'target_arch == "mipsel"',{
125           'cflags': [
126             '-fomit-frame-pointer',
127           ],
128           'sources': [
129             'ext/convolver_mips_dspr2.cc',
130           ],
131         }],
132       ],
133     },
134     {
135       'target_name': 'image_operations_bench',
136       'type': 'executable',
137       'dependencies': [
138         '../base/base.gyp:base',
139         'skia',
140       ],
141       'include_dirs': [
142         '..',
143       ],
144       'sources': [
145         'ext/image_operations_bench.cc',
146       ],
147     },
148     {
149       'target_name': 'filter_fuzz_stub',
150       'type': 'executable',
151       'dependencies': [
152         '../base/base.gyp:base',
153         'skia.gyp:skia',
154       ],
155       'sources': [
156         'tools/filter_fuzz_stub/filter_fuzz_stub.cc',
157       ],
158       'includes': [
159         '../build/android/increase_size_for_speed.gypi',
160       ],
161     },
162   ],