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 '../ui/shell_dialogs/shell_dialogs.gyp:shell_dialogs',
23 '../url/url.gyp:url_lib',
26 'PRINTING_IMPLEMENTATION',
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',
49 'metafile_skia_wrapper.cc',
50 'metafile_skia_wrapper.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',
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',
81 'printed_document_linux.cc',
82 'printed_document_mac.cc',
83 'printed_document_win.cc',
86 'printed_pages_source.h',
87 'printing_context.cc',
94 'direct_dependent_settings': {
102 '<(DEPTH)/ui/aura/aura.gyp:aura',
105 ['toolkit_uses_gtk == 0',{
106 'sources/': [['exclude', '_cairo\\.cc$']]
107 }, { # else: toolkit_uses_gtk == 1
109 # For FT_Init_FreeType and friends.
110 '../build/linux/system.gyp:freetype2',
111 '../build/linux/system.gyp:gtk',
112 '../build/linux/system.gyp:gtkprint',
115 # Mac-Aura does not support printing.
116 ['OS=="mac" and use_aura==1',{
118 'printed_document_mac.cc',
119 'printing_context_mac.mm',
120 'printing_context_mac.h',
123 ['OS=="mac" and use_aura==0',{
125 'printing_context_mac.mm',
126 'printing_context_mac.h',
131 '../win8/win8.gyp:win8_util',
136 '<(DEPTH)/ui/aura/aura.gyp:aura',
140 # PRINT_BACKEND_AVAILABLE disables the default dummy implementation
141 # of the print backend and enables a custom implementation instead.
142 'PRINT_BACKEND_AVAILABLE',
145 'backend/win_helper.cc',
146 'backend/win_helper.h',
147 'backend/print_backend_win.cc',
148 'printing_context_win.cc',
149 'printing_context_win.h',
152 'print_destination_none.cc',
157 'printing_context_no_system_dialog.cc',
158 'printing_context_no_system_dialog.h',
166 'cups_version': '<!(cups-config --api-version)',
171 '../build/linux/system.gyp:libgcrypt',
174 ['cups_version in ["1.6", "1.7"]', {
176 # CUPS 1.6 deprecated the PPD APIs, but we will stay with this
177 # API for now as supported Linux and Mac OS'es are still using
178 # older versions of CUPS. More info: crbug.com/226176
179 '-Wno-deprecated-declarations',
180 # CUPS 1.7 deprecates httpConnectEncrypt(), see the mac section
184 ['OS=="mac" and mac_sdk=="10.9"', {
185 # The 10.9 SDK includes cups 1.7, which deprecates
186 # httpConnectEncrypt() in favor of httpConnect2(). hhttpConnect2()
187 # is new in 1.7, so it doesn't exist on OS X 10.6-10.8 and we
188 # can't use it until 10.9 is our minimum system version.
189 # (cups_version isn't reliable on OS X, so key the check off of
193 '-Wno-deprecated-declarations',
199 # PRINT_BACKEND_AVAILABLE disables the default dummy implementation
200 # of the print backend and enables a custom implementation instead.
201 'PRINT_BACKEND_AVAILABLE',
204 'backend/cups_helper.cc',
205 'backend/cups_helper.h',
206 'backend/print_backend_cups.cc',
209 ['OS=="linux" and chromeos==1', {
211 # PRINT_BACKEND_AVAILABLE disables the default dummy implementation
212 # of the print backend and enables a custom implementation instead.
213 'PRINT_BACKEND_AVAILABLE',
216 'backend/print_backend_chromeos.cc',
219 ['OS=="linux" and chromeos==0', {
221 'printing_context_linux.cc',
222 'printing_context_linux.h',
227 'printing_context_android.cc',
228 'printing_context_android.h',
231 'printing_jni_headers',
237 'target_name': 'printing_unittests',
238 'type': 'executable',
241 '../testing/gtest.gyp:gtest',
242 '../base/base.gyp:run_all_unittests',
243 '../base/base.gyp:test_support_base',
244 '../ui/gfx/gfx.gyp:gfx',
245 '../ui/gfx/gfx.gyp:gfx_geometry',
249 'emf_win_unittest.cc',
250 'page_number_unittest.cc',
251 'page_range_unittest.cc',
252 'page_setup_unittest.cc',
253 'pdf_metafile_cg_mac_unittest.cc',
254 'printed_page_unittest.cc',
255 'printing_context_win_unittest.cc',
257 'printing_utils_unittest.cc',
261 ['toolkit_uses_gtk == 0', {'sources/': [['exclude', '_gtk_unittest\\.cc$']]}],
262 ['OS!="mac"', {'sources/': [['exclude', '_mac_unittest\\.(cc|mm?)$']]}],
263 ['OS!="win"', {'sources/': [['exclude', '_win_unittest\\.cc$']]}],
269 'backend/cups_helper_unittest.cc',
272 ['toolkit_uses_gtk == 1', {
274 '../build/linux/system.gyp:gtk',
277 [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
279 ['linux_use_tcmalloc == 1', {
281 '../base/allocator/allocator.gyp:allocator',
287 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
288 'msvs_disabled_warnings': [ 4267, ],
291 'target_name': 'cups',
295 'direct_dependent_settings': {
303 '$(SDKROOT)/usr/lib/libcups.dylib',
309 '<!@(python cups_config_helper.py --libs)',
315 '<!@(python cups_config_helper.py --cflags)',
325 ['OS == "android"', {
328 'target_name': 'printing_jni_headers',
331 'android/java/src/org/chromium/printing/PrintingContext.java',
334 'jni_gen_package': 'printing',
335 'jni_generator_ptr_type': 'long',
337 'includes': [ '../build/jni_generator.gypi' ],
340 'target_name': 'printing_java',
343 'java_in_dir': '../printing/android/java',
346 '../base/base.gyp:base_java',
348 'includes': [ '../build/java.gypi' ],