Add signalSyncPoint to the WebGraphicsContext3D command buffer impls.
[chromium-blink-merge.git] / printing / printing.gyp
blobbe4d88356d6100948a6525112e6934ad92bd4d74
1 # Copyright (c) 2012 The Chromium 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.
6   'variables': {
7     'chromium_code': 1,
8   },
9   'targets': [
10     {
11       'target_name': 'printing',
12       'type': '<(component)',
13       'dependencies': [
14         '../base/base.gyp:base',
15         '../base/base.gyp:base_i18n',
16         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
17         '../build/temp_gyp/googleurl.gyp:googleurl',
18         '../skia/skia.gyp:skia',
19         '../third_party/icu/icu.gyp:icui18n',
20         '../third_party/icu/icu.gyp:icuuc',
21         '../ui/ui.gyp:ui',
22       ],
23       'defines': [
24         'PRINTING_IMPLEMENTATION',
25       ],
26       'include_dirs': [
27         '..',
28       ],
29       'sources': [
30         'backend/print_backend.cc',
31         'backend/print_backend.h',
32         'backend/print_backend_consts.cc',
33         'backend/print_backend_consts.h',
34         'backend/print_backend_dummy.cc',
35         'backend/printing_info_win.cc',
36         'backend/printing_info_win.h',
37         'emf_win.cc',
38         'emf_win.h',
39         'image.cc',
40         'image_linux.cc',
41         'image_mac.cc',
42         'image_win.cc',
43         'image.h',
44         'metafile.h',
45         'metafile_impl.h',
46         'metafile_skia_wrapper.h',
47         'metafile_skia_wrapper.cc',
48         'page_number.cc',
49         'page_number.h',
50         'page_range.cc',
51         'page_range.h',
52         'page_setup.cc',
53         'page_setup.h',
54         'page_size_margins.cc',
55         'page_size_margins.h',
56         'pdf_metafile_cg_mac.cc',
57         'pdf_metafile_cg_mac.h',
58         'pdf_metafile_skia.h',
59         'pdf_metafile_skia.cc',
60         'print_destination_interface.h',
61         'print_destination_none.cc',
62         'print_destination_win.cc',
63         'printed_document_gtk.cc',
64         'printed_document.cc',
65         'printed_document.h',
66         'printed_document_mac.cc',
67         'printed_document_win.cc',
68         'printed_page.cc',
69         'printed_page.h',
70         'printed_pages_source.h',
71         'printing_context.cc',
72         'printing_context.h',
73         'print_dialog_gtk_interface.h',
74         'print_job_constants.cc',
75         'print_job_constants.h',
76         'print_settings.cc',
77         'print_settings.h',
78         'print_settings_initializer.cc',
79         'print_settings_initializer.h',
80         'print_settings_initializer_gtk.cc',
81         'print_settings_initializer_gtk.h',
82         'print_settings_initializer_mac.cc',
83         'print_settings_initializer_mac.h',
84         'print_settings_initializer_win.cc',
85         'print_settings_initializer_win.h',
86         'units.cc',
87         'units.h',
88       ],
89       'direct_dependent_settings': {
90         'include_dirs': [
91           '..',
92         ],
93       },
94       'conditions': [
95         ['enable_printing!=1', {
96           'sources/': [
97             ['exclude', '.'],
98           ],
99         }],
100         ['toolkit_uses_gtk == 0',{
101             'sources/': [['exclude', '_cairo\\.cc$']]
102         }],
103         ['OS!="mac"', {'sources/': [['exclude', '_mac\\.(cc|mm?)$']]}],
104         ['OS!="win"', {'sources/': [['exclude', '_win\\.cc$']]
105           }, {  # else: OS=="win"
106             'sources/': [['exclude', '_posix\\.cc$']]
107         }],
108         ['toolkit_uses_gtk == 1', {
109           'dependencies': [
110             # For FT_Init_FreeType and friends.
111             '../build/linux/system.gyp:freetype2',
112             '../build/linux/system.gyp:gtk',
113             '../build/linux/system.gyp:gtkprint',
114           ],
115         }],
116         # Mac-Aura does not support printing.
117         ['OS=="mac" and use_aura==1',{
118           'sources!': [
119             'printed_document_mac.cc',
120             'printing_context_mac.mm',
121             'printing_context_mac.h',
122           ],
123         }],
124         ['OS=="mac" and use_aura==0',{
125           'sources': [
126             'printing_context_mac.mm',
127             'printing_context_mac.h',
128           ],
129         }],
130         ['OS=="win"', {
131           'dependencies': [
132             '../win8/win8.gyp:win8_util',
133           ],
134           'conditions': [
135             ['use_aura==0', {
136               'sources': [
137                 'printing_context_win.cc',
138                 'printing_context_win.h',
139               ],
140           }]],
141           'defines': [
142             # PRINT_BACKEND_AVAILABLE disables the default dummy implementation
143             # of the print backend and enables a custom implementation instead.
144             'PRINT_BACKEND_AVAILABLE',
145           ],
146           'sources': [
147             'backend/win_helper.cc',
148             'backend/win_helper.h',
149             'backend/print_backend_win.cc',
150           ],
151           'sources!': [
152             'print_destination_none.cc',
153           ],
154         }],
155         ['chromeos==1 or use_aura==1',{
156           'sources': [
157             'printing_context_no_system_dialog.cc',
158             'printing_context_no_system_dialog.h',
159           ],
160         }],
161         ['use_cups==1', {
162           'dependencies': [
163             'cups',
164           ],
165           'variables': {
166             'cups_version': '<!(cups-config --api-version)',
167           },
168           'conditions': [
169             ['OS!="mac"', {
170               'dependencies': [
171                 '../build/linux/system.gyp:libgcrypt',
172               ],
173             }],
174             ['cups_version=="1.6"', {
175               'cflags': [
176                 # CUPS 1.6 deprecated the PPD APIs, but we will stay with this
177                 # API for now as supported Linux and Mac OS'es are still using
178                 # older versions of CUPS. More info: crbug.com/226176
179                 '-Wno-deprecated-declarations',
180               ],
181             }],
182           ],
183           'defines': [
184             # PRINT_BACKEND_AVAILABLE disables the default dummy implementation
185             # of the print backend and enables a custom implementation instead.
186             'PRINT_BACKEND_AVAILABLE',
187           ],
188           'sources': [
189             'backend/cups_helper.cc',
190             'backend/cups_helper.h',
191             'backend/print_backend_cups.cc',
192           ],
193         }],
194         ['OS=="linux" and chromeos==1', {
195           'defines': [
196             # PRINT_BACKEND_AVAILABLE disables the default dummy implementation
197             # of the print backend and enables a custom implementation instead.
198             'PRINT_BACKEND_AVAILABLE',
199           ],
200           'sources': [
201             'backend/print_backend_chromeos.cc',
202           ],
203         }],
204         ['toolkit_uses_gtk==1 and chromeos==0', {
205           'sources': [
206             'printing_context_gtk.cc',
207             'printing_context_gtk.h',
208           ],
209         }],
210       ],
211     },
212     {
213       'target_name': 'printing_unittests',
214       'type': 'executable',
215       'dependencies': [
216         'printing',
217         '../testing/gtest.gyp:gtest',
218         '../base/base.gyp:test_support_base',
219         '../ui/ui.gyp:ui',
220       ],
221       'sources': [
222         'backend/print_backend_unittest.cc',
223         'emf_win_unittest.cc',
224         'printing_test.h',
225         'page_number_unittest.cc',
226         'page_range_unittest.cc',
227         'page_setup_unittest.cc',
228         'pdf_metafile_cg_mac_unittest.cc',
229         'printed_page_unittest.cc',
230         'run_all_unittests.cc',
231         'units_unittest.cc',
232       ],
233       'conditions': [
234         ['enable_printing!=1', {
235           'sources/': [
236             ['exclude', '.'],
237             ['include', 'run_all_unittests.cc'],
238           ],
239         }],
240         ['toolkit_uses_gtk == 0', {'sources/': [['exclude', '_gtk_unittest\\.cc$']]}],
241         ['OS!="mac"', {'sources/': [['exclude', '_mac_unittest\\.(cc|mm?)$']]}],
242         ['OS!="win"', {'sources/': [['exclude', '_win_unittest\\.cc$']]}],
243         ['OS=="win" and use_aura == 0', {
244           'sources': [
245             'printing_context_win_unittest.cc',
246           ]
247         }],
248         ['use_cups==1', {
249           'defines': [
250             'USE_CUPS',
251           ],
252           'sources': [
253             'backend/cups_helper_unittest.cc',
254           ],
255         }],
256         ['toolkit_uses_gtk == 1', {
257           'dependencies': [
258             '../build/linux/system.gyp:gtk',
259           ],
260         }],
261         [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
262           'conditions': [
263             ['linux_use_tcmalloc == 1', {
264               'dependencies': [
265                 '../base/allocator/allocator.gyp:allocator',
266               ],
267             }],
268           ],
269         }],
270       ],
271       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
272       'msvs_disabled_warnings': [ 4267, ],
273     },
274     {
275       'target_name': 'cups',
276       'type': 'none',
277       'conditions': [
278         ['use_cups==1', {
279           'direct_dependent_settings': {
280             'defines': [
281               'USE_CUPS',
282             ],
283             'conditions': [
284               ['OS=="mac"', {
285                 'link_settings': {
286                   'libraries': [
287                     '$(SDKROOT)/usr/lib/libcups.dylib',
288                   ]
289                 },
290               }, {
291                 'link_settings': {
292                   'libraries': [
293                     '<!@(python cups_config_helper.py --libs)',
294                   ],
295                 },
296               }],
297               [ 'os_bsd==1', {
298                 'cflags': [
299                   '<!@(python cups_config_helper.py --cflags)',
300                 ],
301               }],
302             ],
303           },
304         }],
305       ],
306     },
307   ],