OLD | NEW |
| (Empty) |
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. | |
4 | |
5 { | |
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"', { | |
12 'targets': [ | |
13 { | |
14 'target_name': 'skia_library', | |
15 'type': 'static_library', | |
16 # The optimize: 'max' scattered throughout are particularly | |
17 # important when compiled by MSVC 2013, which seems | |
18 # to mis-link-time-compile code that's built with | |
19 # different optimization levels. http://crbug.com/543583 | |
20 'variables': { | |
21 'optimize': 'max', | |
22 }, | |
23 'includes': [ | |
24 'skia_common.gypi', | |
25 'skia_library.gypi', | |
26 '../build/android/increase_size_for_speed.gypi', | |
27 # Disable LTO due to compiler error | |
28 # in mems_in_disjoint_alias_sets_p, at alias.c:393 | |
29 # crbug.com/422255 | |
30 '../build/android/disable_gcc_lto.gypi', | |
31 ], | |
32 }, | |
33 ], | |
34 }], | |
35 ['component=="static_library"', { | |
36 'targets': [ | |
37 { | |
38 'target_name': 'skia', | |
39 # The optimize: 'max' scattered throughout are particularly | |
40 # important when compiled by MSVC 2013, which seems | |
41 # to mis-link-time-compile code that's built with | |
42 # different optimization levels. http://crbug.com/543583 | |
43 'variables': { | |
44 'optimize': 'max', | |
45 }, | |
46 'type': 'none', | |
47 'dependencies': [ | |
48 'skia_library', | |
49 'skia_chrome', | |
50 ], | |
51 'export_dependent_settings': [ | |
52 'skia_library', | |
53 'skia_chrome', | |
54 ], | |
55 'direct_dependent_settings': { | |
56 'conditions': [ | |
57 [ 'OS == "win"', { | |
58 'defines': [ | |
59 'GR_GL_FUNCTION_TYPE=__stdcall', | |
60 ], | |
61 }], | |
62 ], | |
63 }, | |
64 }, | |
65 { | |
66 'target_name': 'skia_chrome', | |
67 'type': 'static_library', | |
68 'includes': [ | |
69 'skia_chrome.gypi', | |
70 'skia_common.gypi', | |
71 '../build/android/increase_size_for_speed.gypi', | |
72 ], | |
73 }, | |
74 ], | |
75 }, | |
76 { # component != static_library | |
77 'targets': [ | |
78 { | |
79 'target_name': 'skia', | |
80 # The optimize: 'max' scattered throughout are particularly | |
81 # important when compiled by MSVC 2013, which seems | |
82 # to mis-link-time-compile code that's built with | |
83 # different optimization levels. http://crbug.com/543583 | |
84 'variables': { | |
85 'optimize': 'max', | |
86 }, | |
87 'type': 'shared_library', | |
88 'includes': [ | |
89 # Include skia_common.gypi first since it contains filename | |
90 # exclusion rules. This allows the following includes to override | |
91 # the exclusion rules. | |
92 'skia_common.gypi', | |
93 'skia_chrome.gypi', | |
94 'skia_library.gypi', | |
95 '../build/android/increase_size_for_speed.gypi', | |
96 ], | |
97 'defines': [ | |
98 'SKIA_DLL', | |
99 'SKIA_IMPLEMENTATION=1', | |
100 'GR_GL_IGNORE_ES3_MSAA=0', | |
101 ], | |
102 'direct_dependent_settings': { | |
103 'conditions': [ | |
104 [ 'OS == "win"', { | |
105 'defines': [ | |
106 'GR_GL_FUNCTION_TYPE=__stdcall', | |
107 ], | |
108 }], | |
109 ], | |
110 'defines': [ | |
111 'SKIA_DLL', | |
112 'GR_GL_IGNORE_ES3_MSAA=0', | |
113 ], | |
114 }, | |
115 }, | |
116 { | |
117 'target_name': 'skia_library', | |
118 'type': 'none', | |
119 }, | |
120 { | |
121 'target_name': 'skia_chrome', | |
122 'type': 'none', | |
123 }, | |
124 ], | |
125 }], | |
126 ], | |
127 | |
128 # targets that are not dependent upon the component type | |
129 'targets': [ | |
130 { | |
131 'target_name': 'image_operations_bench', | |
132 # The optimize: 'max' scattered throughout are particularly | |
133 # important when compiled by MSVC 2013, which seems | |
134 # to mis-link-time-compile code that's built with | |
135 # different optimization levels. http://crbug.com/543583 | |
136 'variables': { | |
137 'optimize': 'max', | |
138 }, | |
139 'type': 'executable', | |
140 'dependencies': [ | |
141 '../base/base.gyp:base', | |
142 'skia', | |
143 ], | |
144 'include_dirs': [ | |
145 '..', | |
146 ], | |
147 'sources': [ | |
148 'ext/image_operations_bench.cc', | |
149 ], | |
150 }, | |
151 { | |
152 'target_name': 'filter_fuzz_stub', | |
153 'type': 'executable', | |
154 # The optimize: 'max' scattered throughout are particularly | |
155 # important when compiled by MSVC 2013, which seems | |
156 # to mis-link-time-compile code that's built with | |
157 # different optimization levels. http://crbug.com/543583 | |
158 'variables': { | |
159 'optimize': 'max', | |
160 }, | |
161 'dependencies': [ | |
162 '../base/base.gyp:base', | |
163 '../base/base.gyp:test_support_base', | |
164 'skia.gyp:skia', | |
165 ], | |
166 'sources': [ | |
167 'tools/filter_fuzz_stub/filter_fuzz_stub.cc', | |
168 ], | |
169 'includes': [ | |
170 '../build/android/increase_size_for_speed.gypi', | |
171 ], | |
172 }, | |
173 { | |
174 'target_name': 'skia_interfaces_mojom', | |
175 'type': 'none', | |
176 'variables': { | |
177 'mojom_files': [ | |
178 'public/interfaces/bitmap.mojom', | |
179 ], | |
180 'mojom_typemaps': [ | |
181 'public/interfaces/skbitmap.typemap', | |
182 ], | |
183 'use_new_wrapper_types': 'false', | |
184 }, | |
185 'includes': [ '../mojo/mojom_bindings_generator_explicit.gypi' ], | |
186 }, | |
187 { | |
188 'target_name': 'skia_mojo', | |
189 'type': 'static_library', | |
190 # The optimize: 'max' scattered throughout are particularly | |
191 # important when compiled by MSVC 2013, which seems | |
192 # to mis-link-time-compile code that's built with | |
193 # different optimization levels. http://crbug.com/543583 | |
194 'variables': { | |
195 'optimize': 'max', | |
196 }, | |
197 'sources': [ | |
198 '../skia/public/interfaces/bitmap_skbitmap_struct_traits.cc', | |
199 ], | |
200 'dependencies': [ | |
201 'skia', | |
202 'skia_interfaces_mojom', | |
203 '../base/base.gyp:base', | |
204 ], | |
205 'export_dependent_settings': [ | |
206 'skia', | |
207 ], | |
208 }, | |
209 ], | |
210 } | |
OLD | NEW |