Add explicit |forceOnlineSignin| to user pod status
[chromium-blink-merge.git] / printing / printing.gyp
blob535e018c4b4453ef6a070a1d413cc421463b3bdb
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         '../skia/skia.gyp:skia',
18         '../third_party/icu/icu.gyp:icui18n',
19         '../third_party/icu/icu.gyp:icuuc',
20         '../ui/gfx/gfx.gyp:gfx',
21         '../ui/gfx/gfx.gyp:gfx_geometry',
22         '../ui/shell_dialogs/shell_dialogs.gyp:shell_dialogs',
23         '../url/url.gyp:url_lib',
24       ],
25       'defines': [
26         'PRINTING_IMPLEMENTATION',
27       ],
28       'include_dirs': [
29         '..',
30       ],
31       'sources': [
32         'backend/print_backend.cc',
33         'backend/print_backend.h',
34         'backend/print_backend_consts.cc',
35         'backend/print_backend_consts.h',
36         'backend/print_backend_dummy.cc',
37         'backend/printing_info_win.cc',
38         'backend/printing_info_win.h',
39         'emf_win.cc',
40         'emf_win.h',
41         'image.cc',
42         'image.h',
43         'image_android.cc',
44         'image_linux.cc',
45         'image_mac.cc',
46         'image_win.cc',
47         'metafile.h',
48         'metafile_impl.h',
49         'metafile_skia_wrapper.cc',
50         'metafile_skia_wrapper.h',
51         'page_number.cc',
52         'page_number.h',
53         'page_range.cc',
54         'page_range.h',
55         'page_setup.cc',
56         'page_setup.h',
57         'page_size_margins.cc',
58         'page_size_margins.h',
59         'pdf_metafile_cg_mac.cc',
60         'pdf_metafile_cg_mac.h',
61         'pdf_metafile_skia.cc',
62         'pdf_metafile_skia.h',
63         'print_destination_interface.h',
64         'print_destination_none.cc',
65         'print_destination_win.cc',
66         'print_dialog_gtk_interface.h',
67         'print_job_constants.cc',
68         'print_job_constants.h',
69         'print_settings.cc',
70         'print_settings.h',
71         'print_settings_initializer.cc',
72         'print_settings_initializer.h',
73         'print_settings_initializer_gtk.cc',
74         'print_settings_initializer_gtk.h',
75         'print_settings_initializer_mac.cc',
76         'print_settings_initializer_mac.h',
77         'print_settings_initializer_win.cc',
78         'print_settings_initializer_win.h',
79         'printed_document.cc',
80         'printed_document.h',
81         'printed_document_linux.cc',
82         'printed_document_mac.cc',
83         'printed_document_win.cc',
84         'printed_page.cc',
85         'printed_page.h',
86         'printed_pages_source.h',
87         'printing_context.cc',
88         'printing_context.h',
89         'printing_utils.cc',
90         'printing_utils.h',
91         'units.cc',
92         'units.h',
93       ],
94       'direct_dependent_settings': {
95         'include_dirs': [
96           '..',
97         ],
98       },
99       'conditions': [
100         ['use_aura==1', {
101           'dependencies': [
102             '<(DEPTH)/ui/aura/aura.gyp:aura',
103           ],
104         }], 
105         ['toolkit_uses_gtk == 0',{
106             'sources/': [['exclude', '_cairo\\.cc$']]
107         }],
108         ['OS!="mac"', {'sources/': [['exclude', '_mac\\.(cc|mm?)$']]}],
109         ['OS!="win"', {'sources/': [['exclude', '_win\\.cc$']]
110           }, {  # else: OS=="win"
111             'sources/': [['exclude', '_posix\\.cc$']]
112         }],
113         ['toolkit_uses_gtk == 1', {
114           'dependencies': [
115             # For FT_Init_FreeType and friends.
116             '../build/linux/system.gyp:freetype2',
117             '../build/linux/system.gyp:gtk',
118             '../build/linux/system.gyp:gtkprint',
119           ],
120         }],
121         # Mac-Aura does not support printing.
122         ['OS=="mac" and use_aura==1',{
123           'sources!': [
124             'printed_document_mac.cc',
125             'printing_context_mac.mm',
126             'printing_context_mac.h',
127           ],
128         }],
129         ['OS=="mac" and use_aura==0',{
130           'sources': [
131             'printing_context_mac.mm',
132             'printing_context_mac.h',
133           ],
134         }],
135         ['OS=="win"', {
136           'dependencies': [
137             '../win8/win8.gyp:win8_util',
138           ],
139           'conditions': [
140             ['use_aura==1', {
141               'dependencies': [
142                 '<(DEPTH)/ui/aura/aura.gyp:aura',
143               ],
144           }]],
145           'defines': [
146             # PRINT_BACKEND_AVAILABLE disables the default dummy implementation
147             # of the print backend and enables a custom implementation instead.
148             'PRINT_BACKEND_AVAILABLE',
149           ],
150           'sources': [
151             'backend/win_helper.cc',
152             'backend/win_helper.h',
153             'backend/print_backend_win.cc',
154             'printing_context_win.cc',
155             'printing_context_win.h',
156           ],
157           'sources!': [
158             'print_destination_none.cc',
159           ],
160         }],
161         ['chromeos==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           'variables': {
172             'cups_version': '<!(cups-config --api-version)',
173           },
174           'conditions': [
175             ['OS!="mac"', {
176               'dependencies': [
177                 '../build/linux/system.gyp:libgcrypt',
178               ],
179             }],
180             ['cups_version in ["1.6", "1.7"]', {
181               'cflags': [
182                 # CUPS 1.6 deprecated the PPD APIs, but we will stay with this
183                 # API for now as supported Linux and Mac OS'es are still using
184                 # older versions of CUPS. More info: crbug.com/226176
185                 '-Wno-deprecated-declarations',
186                 # CUPS 1.7 deprecates httpConnectEncrypt(), see the mac section
187                 # below.
188               ],
189             }],
190             ['OS=="mac" and mac_sdk=="10.9"', {
191               # The 10.9 SDK includes cups 1.7, which deprecates
192               # httpConnectEncrypt() in favor of httpConnect2(). hhttpConnect2()
193               # is new in 1.7, so it doesn't exist on OS X 10.6-10.8 and we
194               # can't use it until 10.9 is our minimum system version.
195               # (cups_version isn't reliable on OS X, so key the check off of
196               # mac_sdk).
197               'xcode_settings': {
198                 'WARNING_CFLAGS':  [
199                   '-Wno-deprecated-declarations',
200                 ],
201               },
202             }],
203           ],
204           'defines': [
205             # PRINT_BACKEND_AVAILABLE disables the default dummy implementation
206             # of the print backend and enables a custom implementation instead.
207             'PRINT_BACKEND_AVAILABLE',
208           ],
209           'sources': [
210             'backend/cups_helper.cc',
211             'backend/cups_helper.h',
212             'backend/print_backend_cups.cc',
213           ],
214         }],
215         ['OS=="linux" and chromeos==1', {
216           'defines': [
217             # PRINT_BACKEND_AVAILABLE disables the default dummy implementation
218             # of the print backend and enables a custom implementation instead.
219             'PRINT_BACKEND_AVAILABLE',
220           ],
221           'sources': [
222             'backend/print_backend_chromeos.cc',
223           ],
224         }],
225         ['OS=="linux" and chromeos==0', {
226           'sources': [
227             'printing_context_linux.cc',
228             'printing_context_linux.h',
229           ],
230         }],
231         ['OS=="android"', {
232           'sources': [
233             'printing_context_android.cc',
234             'printing_context_android.h',
235           ],
236           'dependencies': [
237             'printing_jni_headers',
238           ],
239         }],
240       ],
241     },
242     {
243       'target_name': 'printing_unittests',
244       'type': 'executable',
245       'dependencies': [
246         'printing',
247         '../testing/gtest.gyp:gtest',
248         '../base/base.gyp:run_all_unittests',
249         '../base/base.gyp:test_support_base',
250         '../ui/gfx/gfx.gyp:gfx',
251         '../ui/gfx/gfx.gyp:gfx_geometry',
252         '../ui/ui.gyp:ui',
253       ],
254       'sources': [
255         'emf_win_unittest.cc',
256         'page_number_unittest.cc',
257         'page_range_unittest.cc',
258         'page_setup_unittest.cc',
259         'pdf_metafile_cg_mac_unittest.cc',
260         'printed_page_unittest.cc',
261         'printing_context_win_unittest.cc',
262         'printing_test.h',
263         'printing_utils_unittest.cc',
264         'units_unittest.cc',
265       ],
266       'conditions': [
267         ['toolkit_uses_gtk == 0', {'sources/': [['exclude', '_gtk_unittest\\.cc$']]}],
268         ['OS!="mac"', {'sources/': [['exclude', '_mac_unittest\\.(cc|mm?)$']]}],
269         ['OS!="win"', {'sources/': [['exclude', '_win_unittest\\.cc$']]}],
270         ['use_cups==1', {
271           'defines': [
272             'USE_CUPS',
273           ],
274           'sources': [
275             'backend/cups_helper_unittest.cc',
276           ],
277         }],
278         ['toolkit_uses_gtk == 1', {
279           'dependencies': [
280             '../build/linux/system.gyp:gtk',
281           ],
282         }],
283         [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
284           'conditions': [
285             ['linux_use_tcmalloc == 1', {
286               'dependencies': [
287                 '../base/allocator/allocator.gyp:allocator',
288               ],
289             }],
290           ],
291         }],
292       ],
293       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
294       'msvs_disabled_warnings': [ 4267, ],
295     },
296     {
297       'target_name': 'cups',
298       'type': 'none',
299       'conditions': [
300         ['use_cups==1', {
301           'direct_dependent_settings': {
302             'defines': [
303               'USE_CUPS',
304             ],
305             'conditions': [
306               ['OS=="mac"', {
307                 'link_settings': {
308                   'libraries': [
309                     '$(SDKROOT)/usr/lib/libcups.dylib',
310                   ]
311                 },
312               }, {
313                 'link_settings': {
314                   'libraries': [
315                     '<!@(python cups_config_helper.py --libs)',
316                   ],
317                 },
318               }],
319               [ 'os_bsd==1', {
320                 'cflags': [
321                   '<!@(python cups_config_helper.py --cflags)',
322                 ],
323               }],
324             ],
325           },
326         }],
327       ],
328     },
329   ],
330   'conditions': [
331     ['OS == "android"', {
332       'targets': [
333         {
334           'target_name': 'printing_jni_headers',
335           'type': 'none',
336           'sources': [
337             'android/java/src/org/chromium/printing/PrintingContext.java',
338           ],
339           'variables': {
340             'jni_gen_package': 'printing',
341             'jni_generator_ptr_type': 'long',
342           },
343           'includes': [ '../build/jni_generator.gypi' ],
344         },
345         {
346           'target_name': 'printing_java',
347           'type': 'none',
348           'variables': {
349             'java_in_dir': '../printing/android/java',
350           },
351           'dependencies': [
352             '../base/base.gyp:base_java',
353           ],
354           'includes': [ '../build/java.gypi'  ],
355         }
356       ]
357     }],
358   ]