skia2/gyp/pdf.gyp
halcanary 7be0ce0ab1 SkPDF: Add Sfntly to DEPS, gyp
Note: this can be disabled via:
    GYP_DEFINES='skia_pdf_use_sfntly=0

Warning: dm is 34% slower and uses 9% more memory.  This is
okay.

Motivation: We want to test this code path in DM, since it is
always used by Chromium and Android.

BUG=skia:3563

Committed: https://skia.googlesource.com/skia/+/6a53b04e26749ea61f690ece408f2a1c0a5ad5bb

Review URL: https://codereview.chromium.org/1134683006
2015-05-18 13:15:56 -07:00

60 lines
1.7 KiB
Python

# Copyright 2015 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This file builds the PDF backend.
{
'targets': [
{
'target_name': 'pdf',
'product_name': 'skia_pdf',
'type': 'static_library',
'standalone_static_library': 1,
'variables': { 'skia_pdf_use_sfntly%': 1, },
'dependencies': [
'skia_lib.gyp:skia_lib',
'skflate.gyp:skflate',
],
'includes': [
'pdf.gypi',
],
'include_dirs': [
'../src/core', # needed to get SkGlyphCache.h and SkTextFormatParams.h
'../src/pdf',
'../src/utils', # needed to get SkBitSet.h
],
'sources': [
'pdf.gypi', # Makes the gypi appear in IDEs (but does not modify the build).
],
'conditions': [
[ 'skia_pdf_use_sfntly and not skia_android_framework and \
skia_os in ["win", "android", "linux", "chromeos", "mac"]',
{ 'dependencies': [ 'sfntly.gyp:sfntly' ] }
],
[ 'skia_android_framework', {
# Add SFTNLY support for PDF (which in turns depends on ICU)
'include_dirs': [
'external/sfntly/cpp/src',
],
'libraries': [
'libsfntly.a',
'-licuuc',
'-licui18n',
],
}
],
],
# This section makes all targets that depend on this target
# #define SK_SUPPORT_PDF and have access to the pdf header files.
'direct_dependent_settings': {
'defines': [
'SK_SUPPORT_PDF',
],
'include_dirs': [
'../include/core', # SkDocument.h
],
},
},
],
}