cc: Flip textures in vertex rather than fragment shader
[chromium-blink-merge.git] / printing / printing.gyp
blob3ac3442abfbb7e1f7bdde80707c8b1a639c017dd
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         ['OS=="mac" and use_skia==0', {
117           'sources/': [
118             ['exclude', 'pdf_metafile_skia\\.(cc|h)$'],
119             ['exclude', 'metafile_skia_wrapper\\.(cc|h)$'],
120           ],
121         }],
122         # Mac-Aura does not support printing.
123         ['OS=="mac" and use_aura==1',{
124           'sources!': [
125             'printed_document_mac.cc',
126             'printing_context_mac.mm',
127             'printing_context_mac.h',
128           ],
129         }],
130         ['OS=="mac" and use_aura==0',{
131           'sources': [
132             'printing_context_mac.mm',
133             'printing_context_mac.h',
134           ],
135         }],
136         ['OS=="win"', {
137           'dependencies': [
138             '../win8/win8.gyp:win8_util',
139           ],
140           'conditions': [
141             ['use_aura==0', {
142               'sources': [
143                 'printing_context_win.cc',
144                 'printing_context_win.h',
145               ],
146           }]],
147           'defines': [
148             # PRINT_BACKEND_AVAILABLE disables the default dummy implementation
149             # of the print backend and enables a custom implementation instead.
150             'PRINT_BACKEND_AVAILABLE',
151           ],
152           'sources': [
153             'backend/win_helper.cc',
154             'backend/win_helper.h',
155             'backend/print_backend_win.cc',
156           ],
157           'sources!': [
158             'print_destination_none.cc',
159           ],
160         }],
161         ['chromeos==1 or use_aura==1',{
162           'sources': [
163             'printing_context_no_system_dialog.cc',
164             'printing_context_no_system_dialog.h',
165           ],
166         }],
167         ['use_cups==1', {
168           'dependencies': [
169             'cups',
170           ],
171           'conditions': [
172             ['OS!="mac"', {
173               'dependencies': [
174                 '../build/linux/system.gyp:libgcrypt',
175               ],
176             }],
177           ],
178           'defines': [
179             # PRINT_BACKEND_AVAILABLE disables the default dummy implementation
180             # of the print backend and enables a custom implementation instead.
181             'PRINT_BACKEND_AVAILABLE',
182           ],
183           'sources': [
184             'backend/cups_helper.cc',
185             'backend/cups_helper.h',
186             'backend/print_backend_cups.cc',
187           ],
188         }],
189         ['OS=="linux" and chromeos==1', {
190           'defines': [
191             # PRINT_BACKEND_AVAILABLE disables the default dummy implementation
192             # of the print backend and enables a custom implementation instead.
193             'PRINT_BACKEND_AVAILABLE',
194           ],
195           'sources': [
196             'backend/print_backend_chromeos.cc',
197           ],
198         }],
199         ['toolkit_uses_gtk==1 and chromeos==0', {
200           'sources': [
201             'printing_context_gtk.cc',
202             'printing_context_gtk.h',
203           ],
204         }],
205       ],
206     },
207     {
208       'target_name': 'printing_unittests',
209       'type': 'executable',
210       'dependencies': [
211         'printing',
212         '../testing/gtest.gyp:gtest',
213         '../base/base.gyp:test_support_base',
214         '../ui/ui.gyp:ui',
215       ],
216       'sources': [
217         'backend/print_backend_unittest.cc',
218         'emf_win_unittest.cc',
219         'printing_test.h',
220         'page_number_unittest.cc',
221         'page_range_unittest.cc',
222         'page_setup_unittest.cc',
223         'pdf_metafile_cg_mac_unittest.cc',
224         'printed_page_unittest.cc',
225         'run_all_unittests.cc',
226         'units_unittest.cc',
227       ],
228       'conditions': [
229         ['enable_printing!=1', {
230           'sources/': [
231             ['exclude', '.'],
232             ['include', 'run_all_unittests.cc'],
233           ],
234         }],
235         ['toolkit_uses_gtk == 0', {'sources/': [['exclude', '_gtk_unittest\\.cc$']]}],
236         ['OS!="mac"', {'sources/': [['exclude', '_mac_unittest\\.(cc|mm?)$']]}],
237         ['OS!="win"', {'sources/': [['exclude', '_win_unittest\\.cc$']]}],
238         ['OS=="win" and use_aura == 0', {
239           'sources': [
240             'printing_context_win_unittest.cc',
241           ]
242         }],
243         ['use_cups==1', {
244           'defines': [
245             'USE_CUPS',
246           ],
247           'sources': [
248             'backend/cups_helper_unittest.cc',
249           ],
250         }],
251         ['toolkit_uses_gtk == 1', {
252           'dependencies': [
253             '../build/linux/system.gyp:gtk',
254           ],
255         }],
256         [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
257           'conditions': [
258             ['linux_use_tcmalloc == 1', {
259               'dependencies': [
260                 '../base/allocator/allocator.gyp:allocator',
261               ],
262             }],
263           ],
264         }],
265       ],
266       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
267       'msvs_disabled_warnings': [ 4267, ],
268     },
269     {
270       'target_name': 'cups',
271       'type': 'none',
272       'conditions': [
273         ['use_cups==1', {
274           'direct_dependent_settings': {
275             'defines': [
276               'USE_CUPS',
277             ],
278             'conditions': [
279               ['OS=="mac"', {
280                 'link_settings': {
281                   'libraries': [
282                     '$(SDKROOT)/usr/lib/libcups.dylib',
283                   ]
284                 },
285               }, {
286                 'link_settings': {
287                   'libraries': [
288                     '<!@(python cups_config_helper.py --libs)',
289                   ],
290                 },
291               }],
292               [ 'os_bsd==1', {
293                 'cflags': [
294                   '<!@(python cups_config_helper.py --cflags)',
295                 ],
296               }],
297             ],
298           },
299         }],
300       ],
301     },
302   ],