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/shell_dialogs/shell_dialogs.gyp:shell_dialogs',
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_gtk.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$']]
107 ['OS!="mac"', {'sources/': [['exclude', '_mac\\.(cc|mm?)$']]}],
108 ['OS!="win"', {'sources/': [['exclude', '_win\\.cc$']]
109 }, { # else: OS=="win"
110 'sources/': [['exclude', '_posix\\.cc$']]
112 ['toolkit_uses_gtk == 1', {
114 # For FT_Init_FreeType and friends.
115 '../build/linux/system.gyp:freetype2',
116 '../build/linux/system.gyp:gtk',
117 '../build/linux/system.gyp:gtkprint',
120 # Mac-Aura does not support printing.
121 ['OS=="mac" and use_aura==1',{
123 'printed_document_mac.cc',
124 'printing_context_mac.mm',
125 'printing_context_mac.h',
128 ['OS=="mac" and use_aura==0',{
130 'printing_context_mac.mm',
131 'printing_context_mac.h',
136 '../win8/win8.gyp:win8_util',
141 '<(DEPTH)/ui/aura/aura.gyp:aura',
145 # PRINT_BACKEND_AVAILABLE disables the default dummy implementation
146 # of the print backend and enables a custom implementation instead.
147 'PRINT_BACKEND_AVAILABLE',
150 'backend/win_helper.cc',
151 'backend/win_helper.h',
152 'backend/print_backend_win.cc',
153 'printing_context_win.cc',
154 'printing_context_win.h',
157 'print_destination_none.cc',
160 ['chromeos==1 or (use_aura==1 and OS!="win")',{
162 'printing_context_no_system_dialog.cc',
163 'printing_context_no_system_dialog.h',
171 'cups_version': '<!(cups-config --api-version)',
176 '../build/linux/system.gyp:libgcrypt',
179 ['cups_version in ["1.6", "1.7"]', {
181 # CUPS 1.6 deprecated the PPD APIs, but we will stay with this
182 # API for now as supported Linux and Mac OS'es are still using
183 # older versions of CUPS. More info: crbug.com/226176
184 '-Wno-deprecated-declarations',
185 # CUPS 1.7 deprecates httpConnectEncrypt(), see the mac section
189 ['OS=="mac" and mac_sdk=="10.9"', {
190 # The 10.9 SDK includes cups 1.7, which deprecates
191 # httpConnectEncrypt() in favor of httpConnect2(). hhttpConnect2()
192 # is new in 1.7, so it doesn't exist on OS X 10.6-10.8 and we
193 # can't use it until 10.9 is our minimum system version.
194 # (cups_version isn't reliable on OS X, so key the check off of
198 '-Wno-deprecated-declarations',
204 # PRINT_BACKEND_AVAILABLE disables the default dummy implementation
205 # of the print backend and enables a custom implementation instead.
206 'PRINT_BACKEND_AVAILABLE',
209 'backend/cups_helper.cc',
210 'backend/cups_helper.h',
211 'backend/print_backend_cups.cc',
214 ['OS=="linux" and chromeos==1', {
216 # PRINT_BACKEND_AVAILABLE disables the default dummy implementation
217 # of the print backend and enables a custom implementation instead.
218 'PRINT_BACKEND_AVAILABLE',
221 'backend/print_backend_chromeos.cc',
224 ['toolkit_uses_gtk==1 and chromeos==0', {
226 'printing_context_gtk.cc',
227 'printing_context_gtk.h',
232 'printing_context_android.cc',
233 'printing_context_android.h',
236 'printing_jni_headers',
239 '<(SHARED_INTERMEDIATE_DIR)/printing',
245 'target_name': 'printing_unittests',
246 'type': 'executable',
249 '../testing/gtest.gyp:gtest',
250 '../base/base.gyp:run_all_unittests',
251 '../base/base.gyp:test_support_base',
252 '../ui/gfx/gfx.gyp:gfx',
256 'emf_win_unittest.cc',
257 'page_number_unittest.cc',
258 'page_range_unittest.cc',
259 'page_setup_unittest.cc',
260 'pdf_metafile_cg_mac_unittest.cc',
261 'printed_page_unittest.cc',
262 'printing_context_win_unittest.cc',
264 'printing_utils_unittest.cc',
268 ['toolkit_uses_gtk == 0', {'sources/': [['exclude', '_gtk_unittest\\.cc$']]}],
269 ['OS!="mac"', {'sources/': [['exclude', '_mac_unittest\\.(cc|mm?)$']]}],
270 ['OS!="win"', {'sources/': [['exclude', '_win_unittest\\.cc$']]}],
276 'backend/cups_helper_unittest.cc',
279 ['toolkit_uses_gtk == 1', {
281 '../build/linux/system.gyp:gtk',
284 [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
286 ['linux_use_tcmalloc == 1', {
288 '../base/allocator/allocator.gyp:allocator',
294 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
295 'msvs_disabled_warnings': [ 4267, ],
298 'target_name': 'cups',
302 'direct_dependent_settings': {
310 '$(SDKROOT)/usr/lib/libcups.dylib',
316 '<!@(python cups_config_helper.py --libs)',
322 '<!@(python cups_config_helper.py --cflags)',
332 ['OS == "android"', {
335 'target_name': 'printing_jni_headers',
338 'android/java/src/org/chromium/printing/PrintingContext.java',
341 'jni_gen_package': 'printing',
343 'includes': [ '../build/jni_generator.gypi' ],
346 'target_name': 'printing_java',
349 'java_in_dir': '../printing/android/java',
352 '../base/base.gyp:base_java',
354 'includes': [ '../build/java.gypi' ],