blob: d20eb235eed1189c846ce8b873c780792c37b53f [file] [log] [blame]
benjaminwagner787ca872015-08-17 12:58:10 -07001# Description:
2# Skia graphics library.
3#
4# Definitions for Google BUILD file.
5
6exports_files(["BUILD.public"])
7
benjaminwagner39e7aa42015-11-18 13:26:10 -08008# All platform-independent SRCS.
9BASE_SRCS = glob(
benjaminwagner787ca872015-08-17 12:58:10 -070010 [
mtkleind55d13a2015-08-18 08:51:49 -070011 "include/private/*.h",
benjaminwagner6f6bef82015-10-15 08:09:44 -070012 "src/**/*.h",
13 "src/**/*.cpp",
benjaminwagner787ca872015-08-17 12:58:10 -070014
mtkleind55d13a2015-08-18 08:51:49 -070015 # Third Party
benjaminwagner787ca872015-08-17 12:58:10 -070016 "third_party/etc1/*.cpp",
benjaminwagner6f6bef82015-10-15 08:09:44 -070017 "third_party/etc1/*.h",
benjaminwagner787ca872015-08-17 12:58:10 -070018 "third_party/ktx/*.cpp",
benjaminwagner6f6bef82015-10-15 08:09:44 -070019 "third_party/ktx/*.h",
benjaminwagner787ca872015-08-17 12:58:10 -070020 ],
21 exclude = [
benjaminwagner6f6bef82015-10-15 08:09:44 -070022 # Exclude platform-dependent files.
23 "src/device/xps/*", # Windows-only. Move to ports?
24 "src/doc/*_XPS.cpp", # Windows-only. Move to ports?
benjaminwagner2211a7b2015-12-01 11:12:05 -080025 "src/fonts/SkFontMgr_fontconfig.cpp",
benjaminwagner6f6bef82015-10-15 08:09:44 -070026 "src/gpu/gl/android/*",
benjaminwagner86ea33e2015-10-26 10:46:25 -070027 "src/gpu/gl/egl/*",
28 "src/gpu/gl/glx/*",
benjaminwagner6f6bef82015-10-15 08:09:44 -070029 "src/gpu/gl/iOS/*",
30 "src/gpu/gl/mac/*",
31 "src/gpu/gl/win/*",
32 "src/opts/**/*",
33 "src/ports/**/*",
34 "src/utils/android/**/*",
35 "src/utils/mac/**/*",
benjaminwagner6f6bef82015-10-15 08:09:44 -070036 "src/utils/SkThreadUtils_win.cpp", # Windows-only. Move to ports?
37 "src/utils/win/**/*",
38 "src/views/sdl/*",
39 "src/views/win/*",
40 "src/views/unix/*",
41
42 # Exclude multiple definitions.
43 # TODO(mtklein): Move to opts?
mtkleind55d13a2015-08-18 08:51:49 -070044 "src/doc/SkDocument_PDF_None.cpp", # We use SkDocument_PDF.cpp.
benjaminwagner86ea33e2015-10-26 10:46:25 -070045 "src/gpu/gl/GrGLCreateNativeInterface_none.cpp",
46 "src/gpu/gl/GrGLDefaultInterface_native.cpp",
benjaminwagner6f6bef82015-10-15 08:09:44 -070047
48 # Exclude files that don't compile with the current DEFINES.
benjaminwagneraada3e82015-10-27 09:14:29 -070049 "src/codec/SkJpegCodec.cpp", # libjpeg_turbo version mismatch.
benjaminwagner6f6bef82015-10-15 08:09:44 -070050 "src/gpu/gl/angle/*", # Requires SK_ANGLE define.
51 "src/gpu/gl/command_buffer/*", # unknown type name 'HMODULE'
52 "src/gpu/gl/mesa/*", # Requires SK_MESA define.
53 "src/svg/parser/*", # Missing SkSVG.h.
54
benjaminwagner39e7aa42015-11-18 13:26:10 -080055 # Conflicting dependencies among Lua versions. See cl/107087297.
56 "src/utils/SkLua*",
57
benjaminwagner6f6bef82015-10-15 08:09:44 -070058 # Not used.
59 "src/animator/**/*",
60 "src/views/**/*",
61 "src/xml/SkBML_Verbs.h",
62 "src/xml/SkBML_XMLParser.cpp",
63 "src/xml/SkXMLPullParser.cpp",
64 ],
65)
66
67# Platform-dependent SRCS for google3-default platform.
benjaminwagner39e7aa42015-11-18 13:26:10 -080068BASE_SRCS_UNIX = glob(
benjaminwagner6f6bef82015-10-15 08:09:44 -070069 [
benjaminwagner2211a7b2015-12-01 11:12:05 -080070 "src/fonts/SkFontMgr_fontconfig.cpp",
benjaminwagner6f6bef82015-10-15 08:09:44 -070071 "src/opts/**/*.cpp",
72 "src/opts/**/*.h",
73 "src/ports/**/*.cpp",
74 "src/ports/**/*.h",
75 ],
76 exclude = [
77 "src/opts/*arm*",
78 "src/opts/*mips*",
79 "src/opts/*NEON*",
80 "src/opts/*neon*",
benjaminwagner86ea33e2015-10-26 10:46:25 -070081 # Included in :opts_ssse3 library.
benjaminwagner6f6bef82015-10-15 08:09:44 -070082 "src/opts/*SSSE3*",
83 "src/opts/*ssse3*",
benjaminwagner86ea33e2015-10-26 10:46:25 -070084 # Included in :opts_sse4 library.
benjaminwagner6f6bef82015-10-15 08:09:44 -070085 "src/opts/*SSE4*",
86 "src/opts/*sse4*",
benjaminwagner6f6bef82015-10-15 08:09:44 -070087 "src/opts/SkBitmapProcState_opts_none.cpp",
benjaminwagner86ea33e2015-10-26 10:46:25 -070088 "src/opts/SkBlitMask_opts_none.cpp",
benjaminwagner6f6bef82015-10-15 08:09:44 -070089 "src/opts/SkBlitRow_opts_none.cpp",
90 "src/ports/*android*",
91 "src/ports/*chromium*",
benjaminwagner6f6bef82015-10-15 08:09:44 -070092 "src/ports/*mac*",
93 "src/ports/*mozalloc*",
94 "src/ports/*nacl*",
95 "src/ports/*win*",
benjaminwagner2211a7b2015-12-01 11:12:05 -080096 "src/ports/SkFontConfigInterface_direct_factory.cpp",
97 "src/ports/SkFontMgr_custom_directory_factory.cpp",
benjaminwagner6f6bef82015-10-15 08:09:44 -070098 "src/ports/SkFontMgr_custom_embedded_factory.cpp",
99 "src/ports/SkFontMgr_empty_factory.cpp",
benjaminwagner404816e2015-12-03 05:04:03 -0800100 "src/ports/SkFontMgr_fontconfig.cpp",
benjaminwagner9dbec092015-11-02 05:53:38 -0800101 "src/ports/SkImageDecoder_CG.cpp",
benjaminwagner2211a7b2015-12-01 11:12:05 -0800102 "src/ports/SkFontMgr_fontconfig_factory.cpp",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700103 "src/ports/SkImageDecoder_WIC.cpp",
104 "src/ports/SkImageDecoder_empty.cpp",
105 "src/ports/SkImageGenerator_none.cpp",
106 "src/ports/SkTLS_none.cpp",
mtkleind55d13a2015-08-18 08:51:49 -0700107 ],
108)
109
benjaminwagner86ea33e2015-10-26 10:46:25 -0700110# Platform-dependent SRCS for google3-default Android.
benjaminwagner39e7aa42015-11-18 13:26:10 -0800111BASE_SRCS_ANDROID = glob(
benjaminwagner86ea33e2015-10-26 10:46:25 -0700112 [
113 # TODO(benjaminwagner): Figure out how to compile with EGL.
benjaminwagner86ea33e2015-10-26 10:46:25 -0700114 "src/opts/**/*.cpp",
115 "src/opts/**/*.h",
116 "src/ports/**/*.cpp",
117 "src/ports/**/*.h",
118 ],
119 exclude = [
120 "src/opts/*mips*",
121 "src/opts/*SSE2*",
122 "src/opts/*SSSE3*",
123 "src/opts/*ssse3*",
124 "src/opts/*SSE4*",
125 "src/opts/*sse4*",
126 "src/opts/*x86*",
127 "src/opts/SkBitmapProcState_opts_none.cpp",
128 "src/opts/SkBlitMask_opts_none.cpp",
129 "src/opts/SkBlitRow_opts_none.cpp",
130 "src/ports/*chromium*",
benjaminwagner86ea33e2015-10-26 10:46:25 -0700131 "src/ports/*fontconfig*",
132 "src/ports/*FontConfig*",
133 "src/ports/*mac*",
134 "src/ports/*mozalloc*",
135 "src/ports/*nacl*",
136 "src/ports/*win*",
137 "src/ports/SkDebug_stdio.cpp",
benjaminwagner2211a7b2015-12-01 11:12:05 -0800138 "src/ports/SkFontConfigInterface_direct_factory.cpp",
139 "src/ports/SkFontConfigInterface_direct_google3_factory.cpp",
benjaminwagner86ea33e2015-10-26 10:46:25 -0700140 "src/ports/SkFontMgr_custom_directory_factory.cpp",
141 "src/ports/SkFontMgr_custom_embedded_factory.cpp",
142 "src/ports/SkFontMgr_empty_factory.cpp",
benjaminwagner9dbec092015-11-02 05:53:38 -0800143 "src/ports/SkImageDecoder_CG.cpp",
benjaminwagner86ea33e2015-10-26 10:46:25 -0700144 "src/ports/SkImageDecoder_WIC.cpp",
145 "src/ports/SkImageDecoder_empty.cpp",
146 "src/ports/SkImageGenerator_none.cpp",
147 "src/ports/SkTLS_none.cpp",
148 ],
149)
150
iroth8b99ef42015-11-02 11:11:21 -0800151# Platform-dependent SRCS for google3-default iOS.
benjaminwagner39e7aa42015-11-18 13:26:10 -0800152BASE_SRCS_IOS = glob(
iroth8b99ef42015-11-02 11:11:21 -0800153 [
iroth8b99ef42015-11-02 11:11:21 -0800154 "src/opts/**/*.cpp",
155 "src/opts/**/*.h",
156 "src/ports/**/*.cpp",
157 "src/ports/**/*.h",
158 ],
159 exclude = [
160 "src/opts/*mips*",
161 "src/opts/*NEON*",
162 "src/opts/*neon*",
163 "src/opts/*SSE2*",
164 "src/opts/*SSSE3*",
165 "src/opts/*ssse3*",
166 "src/opts/*SSE4*",
167 "src/opts/*sse4*",
168 "src/opts/*x86*",
169 "src/opts/SkBitmapProcState_opts_none.cpp",
170 "src/opts/SkBlitMask_opts_none.cpp",
171 "src/opts/SkBlitRow_opts_none.cpp",
172 "src/ports/*android*",
173 "src/ports/*chromium*",
174 "src/ports/*fontconfig*",
175 "src/ports/*FontConfig*",
176 "src/ports/*FreeType*",
177 "src/ports/*mozalloc*",
178 "src/ports/*nacl*",
179 "src/ports/*win*",
180 "src/ports/SkDebug_stdio.cpp",
181 "src/ports/SkFontMgr_custom.cpp",
benjaminwagner2211a7b2015-12-01 11:12:05 -0800182 "src/ports/SkFontConfigInterface_direct_factory.cpp",
183 "src/ports/SkFontConfigInterface_direct_google3_factory.cpp",
iroth8b99ef42015-11-02 11:11:21 -0800184 "src/ports/SkFontMgr_custom_directory_factory.cpp",
185 "src/ports/SkFontMgr_custom_embedded_factory.cpp",
186 "src/ports/SkFontMgr_empty_factory.cpp",
187 "src/ports/SkImageDecoder_CG.cpp",
188 "src/ports/SkImageDecoder_WIC.cpp",
189 "src/ports/SkImageDecoder_empty.cpp",
190 "src/ports/SkImageGenerator_none.cpp",
191 "src/ports/SkTLS_none.cpp",
192 ],
193)
194
benjaminwagner39e7aa42015-11-18 13:26:10 -0800195BASE_SRCS_PLATFORM = select({
196 CONDITION_ANDROID: BASE_SRCS_ANDROID,
197 CONDITION_IOS: BASE_SRCS_IOS,
198 "//conditions:default": BASE_SRCS_UNIX,
benjaminwagner86ea33e2015-10-26 10:46:25 -0700199})
200
benjaminwagner39e7aa42015-11-18 13:26:10 -0800201SSSE3_SRCS = glob(
mtkleind55d13a2015-08-18 08:51:49 -0700202 [
203 "src/opts/*SSSE3*.cpp",
204 "src/opts/*ssse3*.cpp",
205 ],
206)
207
benjaminwagner39e7aa42015-11-18 13:26:10 -0800208SSE4_SRCS = glob(
mtkleind55d13a2015-08-18 08:51:49 -0700209 [
210 "src/opts/*SSE4*.cpp",
211 "src/opts/*sse4*.cpp",
benjaminwagner787ca872015-08-17 12:58:10 -0700212 ],
213)
214
benjaminwagner39e7aa42015-11-18 13:26:10 -0800215BASE_HDRS = glob(
benjaminwagner787ca872015-08-17 12:58:10 -0700216 [
217 "include/**/*.h",
218 ],
mtkleind55d13a2015-08-18 08:51:49 -0700219 exclude = [
benjaminwagner6f6bef82015-10-15 08:09:44 -0700220 "include/private/**/*",
221
222 # Not used.
223 "include/animator/**/*",
224 "include/views/**/*",
225 "include/xml/SkBML_WXMLParser.h",
226 "include/xml/SkBML_XMLParser.h",
mtkleind55d13a2015-08-18 08:51:49 -0700227 ],
benjaminwagner787ca872015-08-17 12:58:10 -0700228)
229
benjaminwagner39e7aa42015-11-18 13:26:10 -0800230# Dependencies.
231BASE_DEPS_UNIX = [
232 ":opts_sse4",
233 ":opts_ssse3",
234]
235
236BASE_DEPS_ANDROID = []
237
238BASE_DEPS_IOS = []
239
240BASE_DEPS = select({
241 CONDITION_ANDROID: BASE_DEPS_ANDROID + BASE_EXTERNAL_DEPS_ANDROID,
242 CONDITION_IOS: BASE_DEPS_IOS + BASE_EXTERNAL_DEPS_IOS,
243 "//conditions:default": BASE_DEPS_UNIX + BASE_EXTERNAL_DEPS_UNIX,
244}) + EXTERNAL_DEPS_ALL
245
benjaminwagner787ca872015-08-17 12:58:10 -0700246# Includes needed by Skia implementation. Not public includes.
247INCLUDES = [
benjaminwagnerfa7e1a02015-11-13 12:27:08 -0800248 "include/android",
benjaminwagner787ca872015-08-17 12:58:10 -0700249 "include/c",
250 "include/codec",
251 "include/config",
252 "include/core",
benjaminwagner787ca872015-08-17 12:58:10 -0700253 "include/effects",
254 "include/gpu",
255 "include/images",
256 "include/pathops",
benjaminwagner787ca872015-08-17 12:58:10 -0700257 "include/pipe",
258 "include/ports",
259 "include/private",
260 "include/utils",
iroth8b99ef42015-11-02 11:11:21 -0800261 "include/utils/mac",
262 "include/utils/win",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700263 "include/svg",
benjaminwagner787ca872015-08-17 12:58:10 -0700264 "include/xml",
benjaminwagnerfa7e1a02015-11-13 12:27:08 -0800265 "src/codec",
benjaminwagner787ca872015-08-17 12:58:10 -0700266 "src/core",
benjaminwagner787ca872015-08-17 12:58:10 -0700267 "src/gpu",
268 "src/image",
269 "src/lazy",
270 "src/opts",
benjaminwagner2211a7b2015-12-01 11:12:05 -0800271 "src/ports",
benjaminwagner787ca872015-08-17 12:58:10 -0700272 "src/pdf",
benjaminwagner787ca872015-08-17 12:58:10 -0700273 "src/sfnt",
274 "src/utils",
275 "third_party/etc1",
276 "third_party/ktx",
benjaminwagner2211a7b2015-12-01 11:12:05 -0800277] + EXTERNAL_INCLUDES
benjaminwagner787ca872015-08-17 12:58:10 -0700278
benjaminwagner39e7aa42015-11-18 13:26:10 -0800279## :dm
benjaminwagner86ea33e2015-10-26 10:46:25 -0700280
281# Platform-independent SRCS for DM.
benjaminwagner6f6bef82015-10-15 08:09:44 -0700282DM_SRCS = glob(
283 [
284 "dm/*.cpp",
285 "dm/*.h",
286 "gm/*.c",
287 "gm/*.cpp",
288 "gm/*.h",
289 "tests/*.cpp",
290 "tests/*.h",
291 "tools/CrashHandler.cpp",
292 "tools/CrashHandler.h",
293 "tools/LazyDecodeBitmap.cpp",
294 "tools/LazyDecodeBitmap.h",
295 "tools/ProcStats.cpp",
296 "tools/ProcStats.h",
297 "tools/Resources.cpp",
298 "tools/Resources.h",
benjaminwagner32885142015-10-24 07:55:31 -0700299 "tools/SkBitmapRegionCanvas.cpp",
300 "tools/SkBitmapRegionCanvas.h",
301 "tools/SkBitmapRegionCodec.cpp",
302 "tools/SkBitmapRegionCodec.h",
msarett5cb48852015-11-06 08:56:32 -0800303 "tools/SkBitmapRegionDecoder.cpp",
304 "tools/SkBitmapRegionDecoder.h",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700305 "tools/SkBitmapRegionSampler.cpp",
306 "tools/SkBitmapRegionSampler.h",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700307 "tools/flags/*.cpp",
308 "tools/flags/*.h",
benjaminwagner32885142015-10-24 07:55:31 -0700309 "tools/sk_tool_utils.cpp",
310 "tools/sk_tool_utils.h",
311 "tools/sk_tool_utils_font.cpp",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700312 "tools/timer/*.cpp",
313 "tools/timer/*.h",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700314 ],
315 exclude = [
benjaminwagner86ea33e2015-10-26 10:46:25 -0700316 "dm/DMSrcSinkAndroid.cpp", # Android-only.
317 "tests/FontMgrAndroidParserTest.cpp", # Android-only.
318 "tests/PathOpsSkpClipTest.cpp", # Alternate main.
benjaminwagner6f6bef82015-10-15 08:09:44 -0700319 "tests/skia_test.cpp", # Old main.
320 "tests/SkpSkGrTest.cpp", # Alternate main.
benjaminwagner6f6bef82015-10-15 08:09:44 -0700321 "tools/timer/SysTimer_mach.cpp",
benjaminwagner86ea33e2015-10-26 10:46:25 -0700322 "tools/timer/SysTimer_windows.cpp",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700323 ],
324)
325
benjaminwagner86ea33e2015-10-26 10:46:25 -0700326DM_SRCS_UNIX = []
327
328DM_SRCS_ANDROID = glob(
329 [
330 # Depends on Android HWUI library that is not available in google3.
331 #"dm/DMSrcSinkAndroid.cpp",
332 "tests/FontMgrAndroidParserTest.cpp",
333 ],
334)
335
336DM_PLATFORM_SRCS = select({
337 CONDITION_ANDROID: DM_SRCS_ANDROID,
338 "//conditions:default": DM_SRCS_UNIX,
339})
340
benjaminwagner6f6bef82015-10-15 08:09:44 -0700341DM_INCLUDES = [
342 "gm",
343 "src/codec",
344 "src/effects",
345 "src/fonts",
346 "src/pathops",
347 "src/pipe/utils",
benjaminwagner86ea33e2015-10-26 10:46:25 -0700348 "src/ports",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700349 "src/utils/debugger",
350 "tests",
351 "tools",
352 "tools/flags",
353 "tools/timer",
354]
355
benjaminwagner39e7aa42015-11-18 13:26:10 -0800356COPTS_ANDROID = ["-mfpu=neon"]
benjaminwagner86ea33e2015-10-26 10:46:25 -0700357
benjaminwagner39e7aa42015-11-18 13:26:10 -0800358COPTS_IOS = []
iroth8b99ef42015-11-02 11:11:21 -0800359
benjaminwagner86ea33e2015-10-26 10:46:25 -0700360COPTS_UNIX = [
benjaminwagner787ca872015-08-17 12:58:10 -0700361 "-Wno-implicit-fallthrough", # Some intentional fallthrough.
benjaminwagner7d974f52015-10-19 13:55:55 -0700362 "-Wno-deprecated-declarations", # Internal use of deprecated methods. :(
benjaminwagner787ca872015-08-17 12:58:10 -0700363]
364
benjaminwagner86ea33e2015-10-26 10:46:25 -0700365COPTS = select({
366 CONDITION_ANDROID: COPTS_ANDROID,
iroth8b99ef42015-11-02 11:11:21 -0800367 CONDITION_IOS: COPTS_IOS,
benjaminwagner86ea33e2015-10-26 10:46:25 -0700368 "//conditions:default": COPTS_UNIX,
369})
370
371DEFINES_ANDROID = [
372 "SK_BUILD_FOR_ANDROID",
373 # TODO(benjaminwagner): Try to get png library updated?
374 "SK_PNG_NO_INDEX_SUPPORTED",
375]
376
iroth8b99ef42015-11-02 11:11:21 -0800377DEFINES_IOS = [
378 "SK_BUILD_FOR_IOS",
379 "SK_IGNORE_ETC1_SUPPORT",
380]
381
benjaminwagner86ea33e2015-10-26 10:46:25 -0700382DEFINES_UNIX = [
383 "SK_BUILD_FOR_UNIX",
384 "SK_SAMPLES_FOR_X",
385]
386
387DEFINES_ALL = [
benjaminwagner787ca872015-08-17 12:58:10 -0700388 # Chrome DEFINES.
389 "SK_USE_FLOATBITS",
390 "SK_USE_FREETYPE_EMBOLDEN",
391 # Turn on a few Google3-specific build fixes.
392 "GOOGLE3",
benjaminwagner787ca872015-08-17 12:58:10 -0700393]
394
benjaminwagner86ea33e2015-10-26 10:46:25 -0700395DEFINES = select({
396 CONDITION_ANDROID: DEFINES_ANDROID,
iroth8b99ef42015-11-02 11:11:21 -0800397 CONDITION_IOS: DEFINES_IOS,
benjaminwagner86ea33e2015-10-26 10:46:25 -0700398 "//conditions:default": DEFINES_UNIX,
399}) + DEFINES_ALL
400
401LINKOPTS = select({
402 CONDITION_ANDROID: [
403 "-ldl",
404 "-lEGL",
405 ],
406 "//conditions:default": ["-ldl"],
407})
benjaminwagner6f6bef82015-10-15 08:09:44 -0700408
409cc_library(
410 name = "opts_ssse3",
benjaminwagner39e7aa42015-11-18 13:26:10 -0800411 srcs = SSSE3_SRCS,
benjaminwagner6f6bef82015-10-15 08:09:44 -0700412 copts = COPTS + ["-mssse3"],
413 defines = DEFINES,
414 includes = INCLUDES,
benjaminwagner8a3760f2015-10-29 13:40:27 -0700415 deps = EXTERNAL_DEPS_ALL,
benjaminwagner6f6bef82015-10-15 08:09:44 -0700416)
417
418cc_library(
419 name = "opts_sse4",
benjaminwagner39e7aa42015-11-18 13:26:10 -0800420 srcs = SSE4_SRCS,
benjaminwagner6f6bef82015-10-15 08:09:44 -0700421 copts = COPTS + ["-msse4"],
422 defines = DEFINES,
423 includes = INCLUDES,
benjaminwagner8a3760f2015-10-29 13:40:27 -0700424 deps = EXTERNAL_DEPS_ALL,
benjaminwagner6f6bef82015-10-15 08:09:44 -0700425)
426
benjaminwagnera445cbc2015-11-18 13:48:47 -0800427# If you need Ganesh (GPU) support in Skia, please contact skia-team@google.com
428# for help.
benjaminwagner6f6bef82015-10-15 08:09:44 -0700429cc_library(
430 name = "skia",
benjaminwagner39e7aa42015-11-18 13:26:10 -0800431 srcs = BASE_SRCS + BASE_SRCS_PLATFORM,
432 hdrs = BASE_HDRS,
benjaminwagner6f6bef82015-10-15 08:09:44 -0700433 copts = COPTS,
434 defines = DEFINES,
435 includes = INCLUDES,
436 linkopts = LINKOPTS,
437 visibility = [":skia_clients"],
benjaminwagner39e7aa42015-11-18 13:26:10 -0800438 deps = BASE_DEPS,
benjaminwagner9dbec092015-11-02 05:53:38 -0800439 alwayslink = 1,
benjaminwagner6f6bef82015-10-15 08:09:44 -0700440)
441
442cc_test(
443 name = "dm",
444 size = "large",
benjaminwagner86ea33e2015-10-26 10:46:25 -0700445 srcs = DM_SRCS + DM_PLATFORM_SRCS,
benjaminwagner6f6bef82015-10-15 08:09:44 -0700446 args = [
447 "--nogpu",
448 "--verbose",
449 # TODO(mtklein): maybe investigate why these fail?
mtkleine47f1a72015-11-20 13:58:18 -0800450 "--match ~FontMgr ~Scalar ~Canvas ~Codec_stripes ~Codec_Dimensions ~Codec ~Stream ~skps ~RecordDraw_TextBounds",
benjaminwagner6f6bef82015-10-15 08:09:44 -0700451 "--resourcePath %s/resources" % BASE_DIR,
452 "--images %s/resources" % BASE_DIR,
453 ],
454 copts = COPTS,
benjaminwagner964eeba2015-10-20 13:00:48 -0700455 data = glob(["resources/**/*"]),
benjaminwagner6f6bef82015-10-15 08:09:44 -0700456 defines = DEFINES,
457 includes = DM_INCLUDES,
458 deps = DM_EXTERNAL_DEPS + [
459 ":skia",
benjaminwagner8a3760f2015-10-29 13:40:27 -0700460 ] + EXTERNAL_DEPS_ALL,
benjaminwagner6f6bef82015-10-15 08:09:44 -0700461)