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