blob: 2c956c5eb36adb0c9fbcfdca1c842c4f4c1f3cf5 [file] [log] [blame]
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -07001# Copyright 2014 PDFium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5{
Tom Sepez452b4f32015-10-13 09:27:27 -07006 'variables': {
7 'pdf_enable_v8%': 1,
Tom Sepezd2e023b2015-12-08 14:36:16 -08008 'pdf_enable_xfa%': 0, # Set to 1 in standalone builds by standalone.gypi.
Wei Li19fdd582016-03-14 14:50:36 -07009 'pdf_use_skia%': 0,
Tom Sepez452b4f32015-10-13 09:27:27 -070010 },
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070011 'target_defaults': {
John Abd-El-Malekca6c0d32015-02-17 13:26:45 -080012 'defines' : [
13 'PNG_PREFIX',
John Abd-El-Malekca6c0d32015-02-17 13:26:45 -080014 'PNG_USE_READ_MACROS',
15 ],
Lei Zhang461b6342015-11-06 10:32:28 -080016 'include_dirs': [
17 # This is implicit in GN.
18 '<(DEPTH)',
Lei Zhang8241df72015-11-06 14:38:48 -080019 '..',
Lei Zhang461b6342015-11-06 10:32:28 -080020 ],
Tom Sepez452b4f32015-10-13 09:27:27 -070021 'conditions': [
22 ['pdf_enable_v8==1', {
23 'defines': [
24 'PDF_ENABLE_V8',
25 ],
26 'include_dirs': [
27 '<(DEPTH)/v8',
28 '<(DEPTH)/v8/include',
29 ],
30 }],
Tom Sepezc46d0002015-11-30 15:46:36 -080031 ['pdf_enable_xfa==1', {
32 'defines': [
33 'PDF_ENABLE_XFA',
34 ],
35 }],
Tom Sepez452b4f32015-10-13 09:27:27 -070036 ],
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070037 },
38 'targets': [
39 {
40 'target_name': 'pdfium_test',
Tom Sepez452b4f32015-10-13 09:27:27 -070041 'type': 'executable',
Tom Sepezd831dc72015-10-19 16:04:22 -070042 'dependencies': [
43 '../pdfium.gyp:pdfium',
44 '../pdfium.gyp:test_support',
Lei Zhang461b6342015-11-06 10:32:28 -080045 # Regardless of whether the library ships against system freetype,
46 # always link this binary against the bundled one for consistency
47 # of results across platforms.
48 '../third_party/third_party.gyp:fx_freetype',
Tom Sepezd831dc72015-10-19 16:04:22 -070049 ],
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070050 'sources': [
51 'pdfium_test.cc',
Tom Sepezaf18cb32015-02-05 15:06:01 -080052 'image_diff_png.cc',
53 ],
Lei Zhang461b6342015-11-06 10:32:28 -080054 'link_settings': {
55 'libraries!': [
56 '-lfreetype',
57 ],
58 },
Tom Sepez452b4f32015-10-13 09:27:27 -070059 'conditions': [
Tom Sepezc46d0002015-11-30 15:46:36 -080060 ['pdf_enable_xfa==0', {
61 'dependencies': [
62 '../third_party/third_party.gyp:fx_lpng',
63 ],
64 }],
Tom Sepez452b4f32015-10-13 09:27:27 -070065 ['pdf_enable_v8==1', {
66 'dependencies': [
machenbach3081cc02016-04-26 03:12:36 -070067 '<(DEPTH)/v8/src/v8.gyp:v8_libplatform',
Tom Sepez452b4f32015-10-13 09:27:27 -070068 ],
69 }],
Cary Clark399be5b2016-03-14 16:51:29 -040070 ['pdf_use_skia==1', {
71 'defines': ['PDF_ENABLE_SKIA'],
72 'dependencies': [
73 '<(DEPTH)/skia/skia.gyp:skia',
74 ],
75 }],
Tom Sepez452b4f32015-10-13 09:27:27 -070076 ],
Tom Sepezaf18cb32015-02-05 15:06:01 -080077 },
78 {
79 'target_name': 'pdfium_diff',
80 'type': 'executable',
81 'variables': { 'enable_wexit_time_destructors': 1, },
82 'dependencies': [
Lei Zhang461b6342015-11-06 10:32:28 -080083 '../pdfium.gyp:pdfium',
Tom Sepezdbe2a8e2015-02-05 15:21:19 -080084 '../third_party/third_party.gyp:pdfium_base',
Tom Sepezaf18cb32015-02-05 15:06:01 -080085 ],
Tom Sepezaf18cb32015-02-05 15:06:01 -080086 'sources': [
87 'image_diff.cc',
88 'image_diff_png.h',
89 'image_diff_png.cc',
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070090 ],
Tom Sepezc46d0002015-11-30 15:46:36 -080091 'conditions': [
92 ['pdf_enable_xfa==0', {
93 'dependencies': [
94 '../third_party/third_party.gyp:fx_lpng',
95 ],
96 }],
97 ],
John Abd-El-Malek3f3b45c2014-05-23 17:28:10 -070098 },
99 ],
John Abd-El-Malekd68f9a32014-06-05 12:45:33 -0700100}