• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2015 Google Inc.
2#
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5# This file builds the PDF backend.
6{
7  'targets': [
8    {
9      'target_name': 'nopdf',
10      'type': 'static_library',
11      'dependencies': [ 'skia_lib.gyp:skia_lib', ],
12      'sources': [ '<(skia_src_path)/doc/SkDocument_PDF_None.cpp', ],
13      'defines': [ 'SK_SUPPORT_PDF=0', ],
14    },
15    {
16      'target_name': 'pdf',
17      'product_name': 'skia_pdf',
18      'type': 'static_library',
19      'standalone_static_library': 1,
20      'variables': { 'skia_pdf_use_sfntly%': 1, },
21      'dependencies': [
22        'skia_lib.gyp:skia_lib',
23        'zlib.gyp:zlib',
24      ],
25      'includes': [
26        'pdf.gypi',
27      ],
28      'include_dirs': [
29        '../include/private',
30        '../src/core', # needed to get SkGlyphCache.h and SkTextFormatParams.h
31        '../src/pdf',
32        '../src/image',
33        '../src/utils', # needed to get SkBitSet.h
34      ],
35      'sources': [
36        'pdf.gypi', # Makes the gypi appear in IDEs (but does not modify the build).
37      ],
38      'conditions': [
39        [ 'skia_pdf_use_sfntly and not skia_android_framework and \
40           skia_os in ["win", "android", "linux", "chromeos", "mac"]',
41          { 'dependencies': [ 'sfntly.gyp:sfntly' ] }
42        ],
43        [ 'skia_pdf_generate_pdfa', { 'defines': ['SK_PDF_GENERATE_PDFA'] } ],
44        [ 'skia_android_framework', {
45            # Add SFTNLY support for PDF (which in turns depends on ICU)
46            'include_dirs': [
47              'external/sfntly/cpp/src',
48            ],
49            'libraries': [
50              'libsfntly.a',
51              '-licuuc',
52              '-licui18n',
53            ],
54          }
55        ],
56      ],
57      'direct_dependent_settings': {
58        'defines': [ 'SK_SUPPORT_PDF=1', ],
59        'include_dirs': [
60          '../include/core',  # SkDocument.h
61        ],
62      },
63    },
64  ],
65}
66