blob: 78209fb1b63b9fccbe60769561d48307996a25ec [file] [log] [blame]
scroggo3e562272015-03-25 10:22:41 -07001# 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.comd4adfa32014-02-05 16:35:12 +00005# This file builds the PDF backend.
epoger@google.comae85aea2011-05-31 13:50:51 +00006{
epoger@google.comae85aea2011-05-31 13:50:51 +00007 'targets': [
8 {
halcanary8ee06f22015-08-11 10:30:12 -07009 'target_name': 'nopdf',
10 'type': 'static_library',
11 'dependencies': [ 'skia_lib.gyp:skia_lib', ],
halcanary23f4d4d2016-03-12 05:59:39 -080012 'sources': [ '<(skia_src_path)/pdf/SkDocument_PDF_None.cpp', ],
halcanary8ee06f22015-08-11 10:30:12 -070013 },
14 {
epoger@google.comae85aea2011-05-31 13:50:51 +000015 'target_name': 'pdf',
borenet@google.comefb1d772012-10-10 19:45:51 +000016 'product_name': 'skia_pdf',
epoger@google.comae85aea2011-05-31 13:50:51 +000017 'type': 'static_library',
borenet@google.comefb1d772012-10-10 19:45:51 +000018 'standalone_static_library': 1,
halcanary6e262052016-03-29 10:10:24 -070019 'variables': {
20 'skia_pdf_use_sfntly%': 1,
halcanary6e262052016-03-29 10:10:24 -070021 },
vandebo@chromium.orgec1a7fa2012-03-21 23:11:46 +000022 'dependencies': [
djsollen@google.com52f02972013-06-03 12:10:19 +000023 'skia_lib.gyp:skia_lib',
halcanaryd9e57152015-08-12 11:24:40 -070024 'zlib.gyp:zlib',
vandebo@chromium.orgec1a7fa2012-03-21 23:11:46 +000025 ],
epoger@google.comae85aea2011-05-31 13:50:51 +000026 'include_dirs': [
mtkleincd1f2da2015-07-28 08:55:14 -070027 '../include/private',
epoger@google.comae85aea2011-05-31 13:50:51 +000028 '../src/core', # needed to get SkGlyphCache.h and SkTextFormatParams.h
halcanary7a14b312015-10-01 07:28:13 -070029 '../src/image',
vandebo@chromium.orgec1a7fa2012-03-21 23:11:46 +000030 '../src/utils', # needed to get SkBitSet.h
epoger@google.comae85aea2011-05-31 13:50:51 +000031 ],
32 'sources': [
Mike Klein552cd132016-10-26 13:32:07 -040033 '../gn/pdf.gni', # Makes the .gni appear in IDEs.
34 '<!@(python read_gni.py ../gn/pdf.gni skia_pdf_sources)',
epoger@google.comae85aea2011-05-31 13:50:51 +000035 ],
scroggo@google.comd4adfa32014-02-05 16:35:12 +000036 'conditions': [
halcanary7be0ce02015-05-18 13:15:56 -070037 [ 'skia_pdf_use_sfntly and not skia_android_framework and \
borenet43bf5112016-04-29 14:01:34 -070038 skia_os in ["win", "android", "linux", "mac"]',
halcanary650e20d2016-08-25 09:07:02 -070039 {
40 'dependencies': [ 'sfntly.gyp:sfntly' ],
41 'defines': [ 'SK_PDF_USE_SFNTLY' ],
42 }
halcanary7be0ce02015-05-18 13:15:56 -070043 ],
scroggo@google.comd4adfa32014-02-05 16:35:12 +000044 [ 'skia_android_framework', {
45 # Add SFTNLY support for PDF (which in turns depends on ICU)
halcanary650e20d2016-08-25 09:07:02 -070046 'include_dirs': [ 'external/sfntly/cpp/src' ],
47 'defines': [ 'SK_PDF_USE_SFNTLY' ],
scroggo@google.comd4adfa32014-02-05 16:35:12 +000048 'libraries': [
49 'libsfntly.a',
50 '-licuuc',
51 '-licui18n',
52 ],
53 }
54 ],
55 ],
epoger@google.comae85aea2011-05-31 13:50:51 +000056 'direct_dependent_settings': {
caryclarkac8d8b82015-01-07 07:36:52 -080057 'include_dirs': [
halcanary07327bf2015-02-19 07:26:12 -080058 '../include/core', # SkDocument.h
caryclarkac8d8b82015-01-07 07:36:52 -080059 ],
epoger@google.comae85aea2011-05-31 13:50:51 +000060 },
epoger@google.comae85aea2011-05-31 13:50:51 +000061 },
62 ],
63}