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$']]
108 ['OS!="mac"', {'sources/': [['exclude', '_mac\\.(cc|mm?)$']]}],
109 ['OS!="win"', {'sources/': [['exclude', '_win\\.cc$']]
110 }, { # else: OS=="win"
111 'sources/': [['exclude', '_posix\\.cc$']]
113 ['toolkit_uses_gtk == 1', {
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',
121 # Mac-Aura does not support printing.
122 ['OS=="mac" and use_aura==1',{
124 'printed_document_mac.cc',
125 'printing_context_mac.mm',
126 'printing_context_mac.h',
129 ['OS=="mac" and use_aura==0',{
131 'printing_context_mac.mm',
132 'printing_context_mac.h',
137 '../win8/win8.gyp:win8_util',
142 '<(DEPTH)/ui/aura/aura.gyp:aura',
146 # PRINT_BACKEND_AVAILABLE disables the default dummy implementation
147 # of the print backend and enables a custom implementation instead.
148 'PRINT_BACKEND_AVAILABLE',
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',
158 'print_destination_none.cc',
163 'printing_context_no_system_dialog.cc',
164 'printing_context_no_system_dialog.h',
172 'cups_version': '<!(cups-config --api-version)',
177 '../build/linux/system.gyp:libgcrypt',
180 ['cups_version in ["1.6", "1.7"]', {
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
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
199 '-Wno-deprecated-declarations',
205 # PRINT_BACKEND_AVAILABLE disables the default dummy implementation
206 # of the print backend and enables a custom implementation instead.
207 'PRINT_BACKEND_AVAILABLE',
210 'backend/cups_helper.cc',
211 'backend/cups_helper.h',
212 'backend/print_backend_cups.cc',
215 ['OS=="linux" and chromeos==1', {
217 # PRINT_BACKEND_AVAILABLE disables the default dummy implementation
218 # of the print backend and enables a custom implementation instead.
219 'PRINT_BACKEND_AVAILABLE',
222 'backend/print_backend_chromeos.cc',
225 ['OS=="linux" and chromeos==0', {
227 'printing_context_linux.cc',
228 'printing_context_linux.h',
233 'printing_context_android.cc',
234 'printing_context_android.h',
237 'printing_jni_headers',
243 'target_name': 'printing_unittests',
244 'type': 'executable',
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',
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',
263 'printing_utils_unittest.cc',
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$']]}],
275 'backend/cups_helper_unittest.cc',
278 ['toolkit_uses_gtk == 1', {
280 '../build/linux/system.gyp:gtk',
283 [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
285 ['linux_use_tcmalloc == 1', {
287 '../base/allocator/allocator.gyp:allocator',
293 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
294 'msvs_disabled_warnings': [ 4267, ],
297 'target_name': 'cups',
301 'direct_dependent_settings': {
309 '$(SDKROOT)/usr/lib/libcups.dylib',
315 '<!@(python cups_config_helper.py --libs)',
321 '<!@(python cups_config_helper.py --cflags)',
331 ['OS == "android"', {
334 'target_name': 'printing_jni_headers',
337 'android/java/src/org/chromium/printing/PrintingContext.java',
340 'jni_gen_package': 'printing',
341 'jni_generator_ptr_type': 'long',
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' ],