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',
21 '../url/url.gyp:url_lib',
24 'PRINTING_IMPLEMENTATION',
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',
47 'metafile_skia_wrapper.h',
48 'metafile_skia_wrapper.cc',
55 'page_size_margins.cc',
56 'page_size_margins.h',
57 'pdf_metafile_cg_mac.cc',
58 'pdf_metafile_cg_mac.h',
59 'pdf_metafile_skia.h',
60 'pdf_metafile_skia.cc',
61 'print_destination_interface.h',
62 'print_destination_none.cc',
63 'print_destination_win.cc',
64 'printed_document_gtk.cc',
65 'printed_document.cc',
67 'printed_document_mac.cc',
68 'printed_document_win.cc',
71 'printed_pages_source.h',
72 'printing_context.cc',
74 'print_dialog_gtk_interface.h',
75 'print_job_constants.cc',
76 'print_job_constants.h',
79 'print_settings_initializer.cc',
80 'print_settings_initializer.h',
81 'print_settings_initializer_gtk.cc',
82 'print_settings_initializer_gtk.h',
83 'print_settings_initializer_mac.cc',
84 'print_settings_initializer_mac.h',
85 'print_settings_initializer_win.cc',
86 'print_settings_initializer_win.h',
90 'direct_dependent_settings': {
96 ['enable_printing==0', {
103 '<(DEPTH)/ui/aura/aura.gyp:aura',
106 ['toolkit_uses_gtk == 0',{
107 'sources/': [['exclude', '_cairo\\.cc$']]
109 ['OS!="mac"', {'sources/': [['exclude', '_mac\\.(cc|mm?)$']]}],
110 ['OS!="win"', {'sources/': [['exclude', '_win\\.cc$']]
111 }, { # else: OS=="win"
112 'sources/': [['exclude', '_posix\\.cc$']]
114 ['toolkit_uses_gtk == 1', {
116 # For FT_Init_FreeType and friends.
117 '../build/linux/system.gyp:freetype2',
118 '../build/linux/system.gyp:gtk',
119 '../build/linux/system.gyp:gtkprint',
122 # Mac-Aura does not support printing.
123 ['OS=="mac" and use_aura==1',{
125 'printed_document_mac.cc',
126 'printing_context_mac.mm',
127 'printing_context_mac.h',
130 ['OS=="mac" and use_aura==0',{
132 'printing_context_mac.mm',
133 'printing_context_mac.h',
138 '../win8/win8.gyp:win8_util',
143 '<(DEPTH)/ui/aura/aura.gyp:aura',
147 # PRINT_BACKEND_AVAILABLE disables the default dummy implementation
148 # of the print backend and enables a custom implementation instead.
149 'PRINT_BACKEND_AVAILABLE',
152 'backend/win_helper.cc',
153 'backend/win_helper.h',
154 'backend/print_backend_win.cc',
155 'printing_context_win.cc',
156 'printing_context_win.h',
159 'print_destination_none.cc',
162 ['chromeos==1 or (use_aura==1 and OS!="win")',{
164 'printing_context_no_system_dialog.cc',
165 'printing_context_no_system_dialog.h',
173 'cups_version': '<!(cups-config --api-version)',
178 '../build/linux/system.gyp:libgcrypt',
181 ['cups_version in ["1.6", "1.7"]', {
183 # CUPS 1.6 deprecated the PPD APIs, but we will stay with this
184 # API for now as supported Linux and Mac OS'es are still using
185 # older versions of CUPS. More info: crbug.com/226176
186 '-Wno-deprecated-declarations',
187 # CUPS 1.7 deprecates httpConnectEncrypt(), see the mac section
191 ['OS=="mac" and mac_sdk=="10.9"', {
192 # The 10.9 SDK includes cups 1.7, which deprecates
193 # httpConnectEncrypt() in favor of httpConnect2(). hhttpConnect2()
194 # is new in 1.7, so it doesn't exist on OS X 10.6-10.8 and we
195 # can't use it until 10.9 is our minimum system version.
196 # (cups_version isn't reliable on OS X, so key the check off of
200 '-Wno-deprecated-declarations',
206 # PRINT_BACKEND_AVAILABLE disables the default dummy implementation
207 # of the print backend and enables a custom implementation instead.
208 'PRINT_BACKEND_AVAILABLE',
211 'backend/cups_helper.cc',
212 'backend/cups_helper.h',
213 'backend/print_backend_cups.cc',
216 ['OS=="linux" and chromeos==1', {
218 # PRINT_BACKEND_AVAILABLE disables the default dummy implementation
219 # of the print backend and enables a custom implementation instead.
220 'PRINT_BACKEND_AVAILABLE',
223 'backend/print_backend_chromeos.cc',
226 ['toolkit_uses_gtk==1 and chromeos==0', {
228 'printing_context_gtk.cc',
229 'printing_context_gtk.h',
234 'printing_context_android.h',
240 'target_name': 'printing_unittests',
241 'type': 'executable',
244 '../testing/gtest.gyp:gtest',
245 '../base/base.gyp:run_all_unittests',
246 '../base/base.gyp:test_support_base',
250 'backend/print_backend_unittest.cc',
251 'emf_win_unittest.cc',
253 'page_number_unittest.cc',
254 'page_range_unittest.cc',
255 'page_setup_unittest.cc',
256 'pdf_metafile_cg_mac_unittest.cc',
257 'printed_page_unittest.cc',
261 ['enable_printing==0', {
266 ['toolkit_uses_gtk == 0', {'sources/': [['exclude', '_gtk_unittest\\.cc$']]}],
267 ['OS!="mac"', {'sources/': [['exclude', '_mac_unittest\\.(cc|mm?)$']]}],
268 ['OS!="win"', {'sources/': [['exclude', '_win_unittest\\.cc$']]}],
269 ['OS=="win" and use_aura == 0', {
271 'printing_context_win_unittest.cc',
279 'backend/cups_helper_unittest.cc',
282 ['toolkit_uses_gtk == 1', {
284 '../build/linux/system.gyp:gtk',
287 [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
289 ['linux_use_tcmalloc == 1', {
291 '../base/allocator/allocator.gyp:allocator',
297 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
298 'msvs_disabled_warnings': [ 4267, ],
301 'target_name': 'cups',
305 'direct_dependent_settings': {
313 '$(SDKROOT)/usr/lib/libcups.dylib',
319 '<!@(python cups_config_helper.py --libs)',
325 '<!@(python cups_config_helper.py --cflags)',