aboutsummaryrefslogtreecommitdiffhomepage
path: root/gyp/pdf.gyp
blob: bc240b10590f7cc7296f16f58641d454678a3f18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# 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': 'nopdf',
      'type': 'static_library',
      'dependencies': [ 'skia_lib.gyp:skia_lib', ],
      'sources': [ '<(skia_src_path)/pdf/SkDocument_PDF_None.cpp', ],
      'defines': [ 'SK_SUPPORT_PDF=0', ],
    },
    {
      'target_name': 'pdf',
      'product_name': 'skia_pdf',
      'type': 'static_library',
      'standalone_static_library': 1,
      'variables': {
        'skia_pdf_use_sfntly%': 1,
        'skia_pdf_less_compression%': 0,  # enable for debugging only
      },
      'dependencies': [
        'skia_lib.gyp:skia_lib',
        'zlib.gyp:zlib',
      ],
      'includes': [
        'pdf.gypi',
      ],
      'include_dirs': [
        '../include/private',
        '../src/core', # needed to get SkGlyphCache.h and SkTextFormatParams.h
        '../src/image',
        '../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", "mac"]',
          { 'dependencies': [ 'sfntly.gyp:sfntly' ] }
        ],
        [ 'skia_pdf_less_compression',
          {'defines': ['SK_PDF_LESS_COMPRESSION'] }
        ],
        [ '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',
            ],
          }
        ],
      ],
      'direct_dependent_settings': {
        'defines': [ 'SK_SUPPORT_PDF=1', ],
        'include_dirs': [
          '../include/core',  # SkDocument.h
        ],
      },
    },
  ],
}