scroggo | 3e56227 | 2015-03-25 10:22:41 -0700 | [diff] [blame] | 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. |
scroggo@google.com | d4adfa3 | 2014-02-05 16:35:12 +0000 | [diff] [blame] | 5 | # This file builds the PDF backend. |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 6 | { |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 7 | 'targets': [ |
| 8 | { |
halcanary | 8ee06f2 | 2015-08-11 10:30:12 -0700 | [diff] [blame] | 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 | { |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 16 | 'target_name': 'pdf', |
borenet@google.com | efb1d77 | 2012-10-10 19:45:51 +0000 | [diff] [blame] | 17 | 'product_name': 'skia_pdf', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 18 | 'type': 'static_library', |
borenet@google.com | efb1d77 | 2012-10-10 19:45:51 +0000 | [diff] [blame] | 19 | 'standalone_static_library': 1, |
halcanary | 7be0ce0 | 2015-05-18 13:15:56 -0700 | [diff] [blame] | 20 | 'variables': { 'skia_pdf_use_sfntly%': 1, }, |
vandebo@chromium.org | ec1a7fa | 2012-03-21 23:11:46 +0000 | [diff] [blame] | 21 | 'dependencies': [ |
djsollen@google.com | 52f0297 | 2013-06-03 12:10:19 +0000 | [diff] [blame] | 22 | 'skia_lib.gyp:skia_lib', |
halcanary | d9e5715 | 2015-08-12 11:24:40 -0700 | [diff] [blame] | 23 | 'zlib.gyp:zlib', |
vandebo@chromium.org | ec1a7fa | 2012-03-21 23:11:46 +0000 | [diff] [blame] | 24 | ], |
commit-bot@chromium.org | 7e5d186 | 2013-08-04 15:09:23 +0000 | [diff] [blame] | 25 | 'includes': [ |
| 26 | 'pdf.gypi', |
| 27 | ], |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 28 | 'include_dirs': [ |
mtklein | cd1f2da | 2015-07-28 08:55:14 -0700 | [diff] [blame] | 29 | '../include/private', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 30 | '../src/core', # needed to get SkGlyphCache.h and SkTextFormatParams.h |
commit-bot@chromium.org | 5e00989 | 2013-10-14 13:42:12 +0000 | [diff] [blame] | 31 | '../src/pdf', |
halcanary | 7a14b31 | 2015-10-01 07:28:13 -0700 | [diff] [blame] | 32 | '../src/image', |
vandebo@chromium.org | ec1a7fa | 2012-03-21 23:11:46 +0000 | [diff] [blame] | 33 | '../src/utils', # needed to get SkBitSet.h |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 34 | ], |
| 35 | 'sources': [ |
commit-bot@chromium.org | 7e5d186 | 2013-08-04 15:09:23 +0000 | [diff] [blame] | 36 | 'pdf.gypi', # Makes the gypi appear in IDEs (but does not modify the build). |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 37 | ], |
scroggo@google.com | d4adfa3 | 2014-02-05 16:35:12 +0000 | [diff] [blame] | 38 | 'conditions': [ |
halcanary | 7be0ce0 | 2015-05-18 13:15:56 -0700 | [diff] [blame] | 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 | ], |
halcanary | 3442261 | 2015-10-12 10:11:18 -0700 | [diff] [blame] | 43 | [ 'skia_pdf_generate_pdfa', { 'defines': ['SK_PDF_GENERATE_PDFA'] } ], |
scroggo@google.com | d4adfa3 | 2014-02-05 16:35:12 +0000 | [diff] [blame] | 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 | ], |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 57 | 'direct_dependent_settings': { |
halcanary | 8ee06f2 | 2015-08-11 10:30:12 -0700 | [diff] [blame] | 58 | 'defines': [ 'SK_SUPPORT_PDF=1', ], |
caryclark | ac8d8b8 | 2015-01-07 07:36:52 -0800 | [diff] [blame] | 59 | 'include_dirs': [ |
halcanary | 07327bf | 2015-02-19 07:26:12 -0800 | [diff] [blame] | 60 | '../include/core', # SkDocument.h |
caryclark | ac8d8b8 | 2015-01-07 07:36:52 -0800 | [diff] [blame] | 61 | ], |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 62 | }, |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 63 | }, |
| 64 | ], |
| 65 | } |