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.
11 'target_name': 'printing',
12 'type': '<(component)',
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 '../url/url.gyp:url_lib',
25 'PRINTING_IMPLEMENTATION',
31 'backend/print_backend.cc',
32 'backend/print_backend.h',
33 'backend/print_backend_consts.cc',
34 'backend/print_backend_consts.h',
35 'backend/print_backend_dummy.cc',
36 'backend/printing_info_win.cc',
37 'backend/printing_info_win.h',
48 'metafile_skia_wrapper.cc',
49 'metafile_skia_wrapper.h',
56 'page_size_margins.cc',
57 'page_size_margins.h',
58 'pdf_metafile_cg_mac.cc',
59 'pdf_metafile_cg_mac.h',
60 'pdf_metafile_skia.cc',
61 'pdf_metafile_skia.h',
62 'print_destination_interface.h',
63 'print_destination_none.cc',
64 'print_destination_win.cc',
65 'print_dialog_gtk_interface.h',
66 'print_job_constants.cc',
67 'print_job_constants.h',
70 'print_settings_initializer.cc',
71 'print_settings_initializer.h',
72 'print_settings_initializer_gtk.cc',
73 'print_settings_initializer_gtk.h',
74 'print_settings_initializer_mac.cc',
75 'print_settings_initializer_mac.h',
76 'print_settings_initializer_win.cc',
77 'print_settings_initializer_win.h',
78 'printed_document.cc',
80 'printed_document_linux.cc',
81 'printed_document_mac.cc',
82 'printed_document_win.cc',
85 'printed_pages_source.h',
86 'printing_context.cc',
93 'direct_dependent_settings': {
101 '<(DEPTH)/ui/aura/aura.gyp:aura',
104 ['toolkit_uses_gtk == 0',{
105 'sources/': [['exclude', '_cairo\\.cc$']]
106 }, { # else: toolkit_uses_gtk == 1
108 # For FT_Init_FreeType and friends.
109 '../build/linux/system.gyp:freetype2',
110 '../build/linux/system.gyp:gtk',
111 '../build/linux/system.gyp:gtkprint',
114 # Mac-Aura does not support printing.
115 ['OS=="mac" and use_aura==1',{
117 'printed_document_mac.cc',
118 'printing_context_mac.mm',
119 'printing_context_mac.h',
122 ['OS=="mac" and use_aura==0',{
124 'printing_context_mac.mm',
125 'printing_context_mac.h',
130 '../win8/win8.gyp:win8_util',
135 '<(DEPTH)/ui/aura/aura.gyp:aura',
139 # PRINT_BACKEND_AVAILABLE disables the default dummy implementation
140 # of the print backend and enables a custom implementation instead.
141 'PRINT_BACKEND_AVAILABLE',
144 'backend/win_helper.cc',
145 'backend/win_helper.h',
146 'backend/print_backend_win.cc',
147 'printing_context_win.cc',
148 'printing_context_win.h',
151 'print_destination_none.cc',
156 'printing_context_no_system_dialog.cc',
157 'printing_context_no_system_dialog.h',
165 'cups_version': '<!(cups-config --api-version)',
170 '../build/linux/system.gyp:libgcrypt',
173 ['cups_version in ["1.6", "1.7"]', {
175 # CUPS 1.6 deprecated the PPD APIs, but we will stay with this
176 # API for now as supported Linux and Mac OS'es are still using
177 # older versions of CUPS. More info: crbug.com/226176
178 '-Wno-deprecated-declarations',
179 # CUPS 1.7 deprecates httpConnectEncrypt(), see the mac section
183 ['OS=="mac" and mac_sdk=="10.9"', {
184 # The 10.9 SDK includes cups 1.7, which deprecates
185 # httpConnectEncrypt() in favor of httpConnect2(). hhttpConnect2()
186 # is new in 1.7, so it doesn't exist on OS X 10.6-10.8 and we
187 # can't use it until 10.9 is our minimum system version.
188 # (cups_version isn't reliable on OS X, so key the check off of
192 '-Wno-deprecated-declarations',
198 # PRINT_BACKEND_AVAILABLE disables the default dummy implementation
199 # of the print backend and enables a custom implementation instead.
200 'PRINT_BACKEND_AVAILABLE',
203 'backend/cups_helper.cc',
204 'backend/cups_helper.h',
205 'backend/print_backend_cups.cc',
208 ['OS=="linux" and chromeos==1', {
210 # PRINT_BACKEND_AVAILABLE disables the default dummy implementation
211 # of the print backend and enables a custom implementation instead.
212 'PRINT_BACKEND_AVAILABLE',
215 'backend/print_backend_chromeos.cc',
218 ['OS=="linux" and chromeos==0', {
220 'printing_context_linux.cc',
221 'printing_context_linux.h',
226 'printing_context_android.cc',
227 'printing_context_android.h',
230 'printing_jni_headers',
236 'target_name': 'printing_unittests',
237 'type': 'executable',
240 '../testing/gtest.gyp:gtest',
241 '../base/base.gyp:run_all_unittests',
242 '../base/base.gyp:test_support_base',
243 '../ui/gfx/gfx.gyp:gfx',
244 '../ui/gfx/gfx.gyp:gfx_geometry',
248 'emf_win_unittest.cc',
249 'page_number_unittest.cc',
250 'page_range_unittest.cc',
251 'page_setup_unittest.cc',
252 'pdf_metafile_cg_mac_unittest.cc',
253 'printed_page_unittest.cc',
254 'printing_context_win_unittest.cc',
256 'printing_utils_unittest.cc',
260 ['toolkit_uses_gtk == 0', {'sources/': [['exclude', '_gtk_unittest\\.cc$']]}],
261 ['OS!="mac"', {'sources/': [['exclude', '_mac_unittest\\.(cc|mm?)$']]}],
262 ['OS!="win"', {'sources/': [['exclude', '_win_unittest\\.cc$']]}],
268 'backend/cups_helper_unittest.cc',
271 ['toolkit_uses_gtk == 1', {
273 '../build/linux/system.gyp:gtk',
276 [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
278 ['linux_use_tcmalloc == 1', {
280 '../base/allocator/allocator.gyp:allocator',
286 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
287 'msvs_disabled_warnings': [ 4267, ],
290 'target_name': 'cups',
294 'direct_dependent_settings': {
302 '$(SDKROOT)/usr/lib/libcups.dylib',
308 '<!@(python cups_config_helper.py --libs)',
314 '<!@(python cups_config_helper.py --cflags)',
324 ['OS == "android"', {
327 'target_name': 'printing_jni_headers',
330 'android/java/src/org/chromium/printing/PrintingContext.java',
333 'jni_gen_package': 'printing',
334 'jni_generator_ptr_type': 'long',
336 'includes': [ '../build/jni_generator.gypi' ],
339 'target_name': 'printing_java',
342 'java_in_dir': '../printing/android/java',
345 '../base/base.gyp:base_java',
347 'includes': [ '../build/java.gypi' ],