Dan Sinclair | a03c343 | 2016-03-16 15:35:20 -0400 | [diff] [blame] | 1 | # Copyright 2013 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 | # This gypi file contains the Skia library. |
| 7 | # In component mode (shared_lib) it is folded into a single shared library with |
thestig | 19ea309 | 2016-05-13 11:24:26 -0700 | [diff] [blame] | 8 | # the PDFium-specific enhancements but in all other cases it is a separate lib. |
Dan Sinclair | a03c343 | 2016-03-16 15:35:20 -0400 | [diff] [blame] | 9 | |
| 10 | # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!WARNING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 11 | # variables and defines should go in skia_common.gypi so they can be seen |
| 12 | # by files listed here and in skia_library_opts.gypi. |
| 13 | # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!WARNING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 14 | { |
| 15 | 'dependencies': [ |
| 16 | 'skia_library_opts.gyp:skia_opts', |
| 17 | '../third_party/third_party.gyp:fx_zlib', |
| 18 | ], |
| 19 | |
| 20 | 'includes': [ |
| 21 | '../third_party/skia/gyp/core.gypi', |
| 22 | '../third_party/skia/gyp/effects.gypi', |
| 23 | '../third_party/skia/gyp/pdf.gypi', |
| 24 | '../third_party/skia/gyp/utils.gypi', |
| 25 | ], |
| 26 | |
| 27 | 'sources': [ |
| 28 | '../third_party/skia/src/lazy/SkDiscardableMemoryPool.cpp', |
| 29 | |
Dan Sinclair | a03c343 | 2016-03-16 15:35:20 -0400 | [diff] [blame] | 30 | '../third_party/skia/src/ports/SkFontConfigInterface_direct.cpp', |
| 31 | '../third_party/skia/src/ports/SkFontConfigInterface_direct_factory.cpp', |
| 32 | |
| 33 | '../third_party/skia/src/ports/SkDiscardableMemory_none.cpp', |
| 34 | |
| 35 | '../third_party/skia/src/fonts/SkFontMgr_indirect.cpp', |
Dan Sinclair | a03c343 | 2016-03-16 15:35:20 -0400 | [diff] [blame] | 36 | '../third_party/skia/src/fonts/SkRemotableFontMgr.cpp', |
| 37 | '../third_party/skia/src/ports/SkRemotableFontMgr_win_dw.cpp', |
| 38 | |
caryclark | 3173543 | 2016-05-11 10:52:53 -0700 | [diff] [blame] | 39 | '../third_party/skia/src/ports/SkImageEncoder_none.cpp', |
Dan Sinclair | a03c343 | 2016-03-16 15:35:20 -0400 | [diff] [blame] | 40 | '../third_party/skia/src/ports/SkImageGenerator_none.cpp', |
| 41 | |
| 42 | '../third_party/skia/src/ports/SkFontHost_FreeType.cpp', |
| 43 | '../third_party/skia/src/ports/SkFontHost_FreeType_common.cpp', |
| 44 | '../third_party/skia/src/ports/SkFontHost_mac.cpp', |
| 45 | '../third_party/skia/src/ports/SkFontHost_win.cpp', |
| 46 | "../third_party/skia/src/ports/SkFontMgr_android.cpp", |
| 47 | "../third_party/skia/src/ports/SkFontMgr_android_factory.cpp", |
| 48 | '../third_party/skia/src/ports/SkFontMgr_android_parser.cpp', |
Cary Clark | cf6bffb | 2016-03-24 10:23:13 -0400 | [diff] [blame] | 49 | '../third_party/skia/src/ports/SkFontMgr_custom.cpp', |
| 50 | '../third_party/skia/src/ports/SkFontMgr_custom_empty_factory.cpp', |
| 51 | |
Dan Sinclair | a03c343 | 2016-03-16 15:35:20 -0400 | [diff] [blame] | 52 | '../third_party/skia/src/ports/SkGlobalInitialization_default.cpp', |
| 53 | '../third_party/skia/src/ports/SkMemory_malloc.cpp', |
| 54 | '../third_party/skia/src/ports/SkOSFile_posix.cpp', |
| 55 | '../third_party/skia/src/ports/SkOSFile_stdio.cpp', |
| 56 | '../third_party/skia/src/ports/SkOSFile_win.cpp', |
| 57 | '../third_party/skia/src/ports/SkScalerContext_win_dw.cpp', |
Dan Sinclair | a03c343 | 2016-03-16 15:35:20 -0400 | [diff] [blame] | 58 | '../third_party/skia/src/ports/SkTLS_pthread.cpp', |
| 59 | '../third_party/skia/src/ports/SkTLS_win.cpp', |
| 60 | '../third_party/skia/src/ports/SkTypeface_win_dw.cpp', |
| 61 | |
| 62 | '../third_party/skia/src/sfnt/SkOTTable_name.cpp', |
| 63 | '../third_party/skia/src/sfnt/SkOTUtils.cpp', |
| 64 | ], |
| 65 | |
| 66 | # Exclude all unused files in skia utils.gypi file |
| 67 | 'sources!': [ |
| 68 | '../third_party/skia/src/utils/SkBoundaryPatch.cpp', |
| 69 | '../third_party/skia/src/utils/SkFrontBufferedStream.cpp', |
| 70 | '../third_party/skia/src/utils/SkCamera.cpp', |
| 71 | '../third_party/skia/src/utils/SkDumpCanvas.cpp', |
| 72 | '../third_party/skia/src/utils/SkInterpolator.cpp', |
| 73 | '../third_party/skia/src/utils/SkLayer.cpp', |
| 74 | '../third_party/skia/src/utils/SkMD5.cpp', |
| 75 | '../third_party/skia/src/utils/SkMeshUtils.cpp', |
| 76 | '../third_party/skia/src/utils/SkNinePatch.cpp', |
Dan Sinclair | a03c343 | 2016-03-16 15:35:20 -0400 | [diff] [blame] | 77 | '../third_party/skia/src/utils/SkParsePath.cpp', |
| 78 | |
| 79 | #windows |
| 80 | '../third_party/skia/src/utils/win/SkAutoCoInitialize.cpp', |
| 81 | '../third_party/skia/src/utils/win/SkIStream.cpp', |
| 82 | '../third_party/skia/src/utils/win/SkWGL_win.cpp', |
| 83 | |
| 84 | #testing |
| 85 | '../third_party/skia/src/fonts/SkGScalerContext.cpp', |
| 86 | ], |
| 87 | |
| 88 | 'include_dirs': [ |
| 89 | '../third_party/skia/include/c', |
| 90 | '../third_party/skia/include/core', |
| 91 | '../third_party/skia/include/client/android', |
| 92 | '../third_party/skia/include/effects', |
| 93 | '../third_party/skia/include/images', |
| 94 | '../third_party/skia/include/lazy', |
| 95 | '../third_party/skia/include/pathops', |
| 96 | '../third_party/skia/include/pdf', |
| 97 | '../third_party/skia/include/pipe', |
| 98 | '../third_party/skia/include/ports', |
| 99 | '../third_party/skia/include/private', |
| 100 | '../third_party/skia/include/utils', |
| 101 | '../third_party/skia/src/core', |
| 102 | '../third_party/skia/src/opts', |
| 103 | '../third_party/skia/src/image', |
| 104 | '../third_party/skia/src/pdf', |
| 105 | '../third_party/skia/src/ports', |
| 106 | '../third_party/skia/src/sfnt', |
| 107 | '../third_party/skia/src/utils', |
| 108 | '../third_party/skia/src/lazy', |
Cary Clark | cf6bffb | 2016-03-24 10:23:13 -0400 | [diff] [blame] | 109 | # TODO(dsinclair): Right way to use third_party.gyp:fx_freetype? |
| 110 | '../third_party/freetype/include', |
Dan Sinclair | a03c343 | 2016-03-16 15:35:20 -0400 | [diff] [blame] | 111 | ], |
| 112 | 'conditions': [ |
| 113 | ['skia_support_gpu != 0', { |
| 114 | 'includes': [ |
| 115 | '../third_party/skia/gyp/gpu.gypi', |
| 116 | ], |
| 117 | 'sources': [ |
| 118 | '<@(skgpu_null_gl_sources)', |
| 119 | '<@(skgpu_sources)', |
| 120 | ], |
| 121 | 'include_dirs': [ |
| 122 | '../third_party/skia/include/gpu', |
| 123 | '../third_party/skia/src/gpu', |
| 124 | ], |
| 125 | }], |
| 126 | ['skia_support_pdf == 0', { |
| 127 | 'sources/': [ |
| 128 | ['exclude', '../third_party/skia/src/doc/SkDocument_PDF.cpp'], |
| 129 | ['exclude', '../third_party/skia/src/pdf/'], |
| 130 | ], |
| 131 | }], |
| 132 | ['skia_support_pdf == 1', { |
| 133 | 'dependencies': [ |
| 134 | '../third_party/sfntly/sfntly.gyp:sfntly', |
| 135 | ], |
| 136 | }], |
| 137 | |
| 138 | [ 'OS == "win"', { |
| 139 | 'sources!': [ |
| 140 | # Keeping _win.cpp |
| 141 | "../third_party/skia/src/utils/SkThreadUtils_pthread.cpp", |
| 142 | ], |
Cary Clark | cf6bffb | 2016-03-24 10:23:13 -0400 | [diff] [blame] | 143 | 'dependencies': [ |
| 144 | '../third_party/third_party.gyp:fx_freetype' |
| 145 | ], |
Dan Sinclair | a03c343 | 2016-03-16 15:35:20 -0400 | [diff] [blame] | 146 | },{ |
| 147 | 'sources!': [ |
| 148 | # Keeping _pthread.cpp |
| 149 | "../third_party/skia/src/utils/SkThreadUtils_win.cpp", |
| 150 | ], |
| 151 | }], |
| 152 | |
| 153 | [ 'OS != "mac"', { |
| 154 | 'sources/': [ |
| 155 | ['exclude', '/mac/'] |
| 156 | ], |
| 157 | }], |
| 158 | [ 'OS == "android" and target_arch == "arm"', { |
| 159 | 'sources': [ |
| 160 | '../third_party/skia/src/core/SkUtilsArm.cpp', |
| 161 | ], |
| 162 | }], |
| 163 | [ 'OS=="linux"', { |
| 164 | 'dependencies': [ |
| 165 | '../third_party/third_party.gyp:fx_freetype' |
| 166 | ], |
| 167 | 'cflags': [ |
| 168 | '-Wno-unused', |
| 169 | '-Wno-unused-function', |
| 170 | ], |
Dan Sinclair | a03c343 | 2016-03-16 15:35:20 -0400 | [diff] [blame] | 171 | }], |
| 172 | [ 'OS=="win" or OS=="mac" or OS=="ios" or OS=="android"', { |
| 173 | 'sources!': [ |
| 174 | '../third_party/skia/src/ports/SkFontConfigInterface_direct.cpp', |
| 175 | '../third_party/skia/src/ports/SkFontConfigInterface_direct_factory.cpp', |
| 176 | '../third_party/skia/src/ports/SkFontHost_fontconfig.cpp', |
| 177 | '../third_party/skia/src/fonts/SkFontMgr_fontconfig.cpp', |
| 178 | ], |
| 179 | }], |
Cary Clark | cf6bffb | 2016-03-24 10:23:13 -0400 | [diff] [blame] | 180 | [ 'OS=="mac" or OS=="ios"', { |
Dan Sinclair | a03c343 | 2016-03-16 15:35:20 -0400 | [diff] [blame] | 181 | 'sources!': [ |
| 182 | '../third_party/skia/src/ports/SkFontHost_FreeType.cpp', |
| 183 | '../third_party/skia/src/ports/SkFontHost_FreeType_common.cpp', |
| 184 | |
| 185 | ], |
| 186 | }], |
| 187 | [ 'OS == "android"', { |
| 188 | 'dependencies': [ |
| 189 | '../third_party/expat/expat.gyp:expat', |
| 190 | '../third_party/freetype-android/freetype.gyp:ft2', |
| 191 | ], |
| 192 | # This exports a hard dependency because it needs to run its |
| 193 | # symlink action in order to expose the skia header files. |
| 194 | 'hard_dependency': 1, |
| 195 | 'include_dirs': [ |
| 196 | '../third_party/expat/files/lib', |
| 197 | ], |
| 198 | },{ # not 'OS == "android"' |
| 199 | 'sources!': [ |
| 200 | "../third_party/skia/src/ports/SkFontMgr_android_factory.cpp", |
| 201 | '../third_party/skia/src/ports/SkFontMgr_android_parser.cpp', |
| 202 | ], |
| 203 | }], |
| 204 | [ 'OS == "ios"', { |
| 205 | 'include_dirs': [ |
| 206 | '../third_party/skia/include/utils/ios', |
| 207 | '../third_party/skia/include/utils/mac', |
| 208 | ], |
| 209 | 'link_settings': { |
| 210 | 'libraries': [ |
| 211 | '$(SDKROOT)/System/Library/Frameworks/ImageIO.framework', |
| 212 | ], |
| 213 | }, |
| 214 | 'sources': [ |
| 215 | # This file is used on both iOS and Mac, so it should be removed |
| 216 | # from the ios and mac conditions and moved into the main sources |
| 217 | # list. |
| 218 | '../third_party/skia/src/utils/mac/SkStream_mac.cpp', |
| 219 | ], |
| 220 | |
| 221 | # The main skia_opts target does not currently work on iOS because the |
| 222 | # target architecture on iOS is determined at compile time rather than |
| 223 | # gyp time (simulator builds are x86, device builds are arm). As a |
| 224 | # temporary measure, this is a separate opts target for iOS-only, using |
| 225 | # the _none.cpp files to avoid architecture-dependent implementations. |
| 226 | 'dependencies': [ |
| 227 | 'skia_library_opts.gyp:skia_opts_none', |
| 228 | ], |
| 229 | 'dependencies!': [ |
| 230 | 'skia_library_opts.gyp:skia_opts', |
| 231 | ], |
| 232 | }], |
| 233 | [ 'OS == "mac"', { |
| 234 | 'direct_dependent_settings': { |
| 235 | 'include_dirs': [ |
| 236 | '../third_party/skia/include/utils/mac', |
| 237 | ], |
| 238 | }, |
| 239 | 'include_dirs': [ |
| 240 | '../third_party/skia/include/utils/mac', |
| 241 | ], |
| 242 | 'link_settings': { |
| 243 | 'libraries': [ |
| 244 | '$(SDKROOT)/System/Library/Frameworks/AppKit.framework', |
| 245 | ], |
| 246 | }, |
| 247 | 'sources': [ |
| 248 | '../third_party/skia/src/utils/mac/SkStream_mac.cpp', |
| 249 | ], |
| 250 | }], |
| 251 | [ 'OS == "win"', { |
| 252 | 'sources!': [ |
| 253 | '../third_party/skia/src/ports/SkOSFile_posix.cpp', |
| 254 | '../third_party/skia/src/ports/SkTime_Unix.cpp', |
| 255 | '../third_party/skia/src/ports/SkTLS_pthread.cpp', |
| 256 | ], |
| 257 | 'include_dirs': [ |
| 258 | '../third_party/skia/include/utils/win', |
| 259 | '../third_party/skia/src/utils/win', |
| 260 | ], |
| 261 | },{ # not 'OS == "win"' |
| 262 | 'sources!': [ |
| 263 | '../third_party/skia/src/ports/SkFontMgr_win_dw.cpp', |
| 264 | '../third_party/skia/src/ports/SkRemotableFontMgr_win_dw.cpp', |
| 265 | '../third_party/skia/src/ports/SkScalerContext_win_dw.cpp', |
| 266 | '../third_party/skia/src/ports/SkTypeface_win_dw.cpp', |
| 267 | |
| 268 | '../third_party/skia/src/utils/win/SkDWrite.cpp', |
| 269 | '../third_party/skia/src/utils/win/SkDWriteFontFileStream.cpp', |
| 270 | '../third_party/skia/src/utils/win/SkDWriteGeometrySink.cpp', |
| 271 | '../third_party/skia/src/utils/win/SkHRESULT.cpp', |
| 272 | ], |
| 273 | }], |
| 274 | ], |
| 275 | 'target_conditions': [ |
| 276 | # Pull in specific Mac files for iOS (which have been filtered out |
| 277 | # by file name rules). |
| 278 | [ 'OS == "ios"', { |
| 279 | 'sources/': [ |
| 280 | ['include', 'SkFontHost_mac\\.cpp$',], |
| 281 | ['include', 'SkStream_mac\\.cpp$',], |
| 282 | ['include', 'SkCreateCGImageRef\\.cpp$',], |
| 283 | ], |
| 284 | 'xcode_settings' : { |
| 285 | 'WARNING_CFLAGS': [ |
| 286 | # SkFontHost_mac.cpp uses API deprecated in iOS 7. |
| 287 | # crbug.com/408571 |
| 288 | '-Wno-deprecated-declarations', |
| 289 | ], |
| 290 | }, |
| 291 | }], |
| 292 | ], |
| 293 | |
| 294 | 'direct_dependent_settings': { |
| 295 | 'include_dirs': [ |
| 296 | '../third_party/skia/include/core', |
| 297 | '../third_party/skia/include/effects', |
| 298 | '../third_party/skia/include/pdf', |
| 299 | '../third_party/skia/include/gpu', |
| 300 | '../third_party/skia/include/lazy', |
| 301 | '../third_party/skia/include/pathops', |
| 302 | '../third_party/skia/include/pipe', |
| 303 | '../third_party/skia/include/ports', |
| 304 | '../third_party/skia/include/utils', |
| 305 | ], |
| 306 | }, |
| 307 | } |