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/print_backend_win.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.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_dialog_gtk_interface.h',
63 'print_job_constants.cc',
64 'print_job_constants.h',
67 'print_settings_conversion.cc',
68 'print_settings_conversion.h',
69 'print_settings_initializer_mac.cc',
70 'print_settings_initializer_mac.h',
71 'print_settings_initializer_win.cc',
72 'print_settings_initializer_win.h',
73 'printed_document.cc',
75 'printed_document_linux.cc',
76 'printed_document_mac.cc',
77 'printed_document_win.cc',
80 'printed_pages_source.h',
81 'printing_context.cc',
83 'printing_context_system_dialog_win.cc',
84 'printing_context_system_dialog_win.h',
85 'printing_context_win.cc',
86 'printing_context_win.h',
92 'direct_dependent_settings': {
100 '<(DEPTH)/ui/aura/aura.gyp:aura',
103 # Mac-Aura does not support printing.
104 ['OS=="mac" and use_aura==1',{
106 'printed_document_mac.cc',
107 'printing_context_mac.mm',
108 'printing_context_mac.h',
111 ['OS=="mac" and use_aura==0',{
113 'printing_context_mac.mm',
114 'printing_context_mac.h',
119 '<(DEPTH)/ui/aura/aura.gyp:aura',
122 # PRINT_BACKEND_AVAILABLE disables the default dummy implementation
123 # of the print backend and enables a custom implementation instead.
124 'PRINT_BACKEND_AVAILABLE',
127 'backend/win_helper.cc',
128 'backend/win_helper.h',
133 'printing_context_no_system_dialog.cc',
134 'printing_context_no_system_dialog.h',
142 'cups_version': '<!(cups-config --api-version)',
145 ['cups_version in ["1.6", "1.7"]', {
147 # CUPS 1.6 deprecated the PPD APIs, but we will stay with this
148 # API for now as supported Linux and Mac OS'es are still using
149 # older versions of CUPS. More info: crbug.com/226176
150 '-Wno-deprecated-declarations',
151 # CUPS 1.7 deprecates httpConnectEncrypt(), see the mac section
155 ['OS=="mac" and mac_sdk=="10.9"', {
156 # The 10.9 SDK includes cups 1.7, which deprecates
157 # httpConnectEncrypt() in favor of httpConnect2(). hhttpConnect2()
158 # is new in 1.7, so it doesn't exist on OS X 10.6-10.8 and we
159 # can't use it until 10.9 is our minimum system version.
160 # (cups_version isn't reliable on OS X, so key the check off of
164 '-Wno-deprecated-declarations',
170 # PRINT_BACKEND_AVAILABLE disables the default dummy implementation
171 # of the print backend and enables a custom implementation instead.
172 'PRINT_BACKEND_AVAILABLE',
175 'backend/cups_helper.cc',
176 'backend/cups_helper.h',
177 'backend/print_backend_cups.cc',
180 ['OS=="linux" and chromeos==1', {
182 # PRINT_BACKEND_AVAILABLE disables the default dummy implementation
183 # of the print backend and enables a custom implementation instead.
184 'PRINT_BACKEND_AVAILABLE',
187 'backend/print_backend_chromeos.cc',
190 ['OS=="linux" and chromeos==0', {
192 'printing_context_linux.cc',
193 'printing_context_linux.h',
198 'printing_context_android.cc',
199 'printing_context_android.h',
202 'printing_jni_headers',
208 'target_name': 'printing_unittests',
209 'type': 'executable',
211 '../base/base.gyp:run_all_unittests',
212 '../base/base.gyp:test_support_base',
213 '../testing/gtest.gyp:gtest',
214 '../ui/base/ui_base.gyp:ui_base',
215 '../ui/gfx/gfx.gyp:gfx',
216 '../ui/gfx/gfx.gyp:gfx_geometry',
217 '../ui/gfx/gfx.gyp:gfx_test_support',
221 'emf_win_unittest.cc',
222 'page_number_unittest.cc',
223 'page_range_unittest.cc',
224 'page_setup_unittest.cc',
225 'pdf_metafile_cg_mac_unittest.cc',
226 'printed_page_unittest.cc',
227 'printing_context_win_unittest.cc',
229 'printing_utils_unittest.cc',
233 ['OS!="mac"', {'sources/': [['exclude', '_mac_unittest\\.(cc|mm?)$']]}],
234 ['OS!="win"', {'sources/': [['exclude', '_win_unittest\\.cc$']]}],
240 'backend/cups_helper_unittest.cc',
243 [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
245 ['use_allocator!="none"', {
247 '../base/allocator/allocator.gyp:allocator',
253 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
254 'msvs_disabled_warnings': [ 4267, ],
257 # GN version: //printing:cups (config, not a target).
258 'target_name': 'cups',
262 'direct_dependent_settings': {
270 '$(SDKROOT)/usr/lib/libcups.dylib',
276 '<!@(python cups_config_helper.py --libs <(sysroot))',
282 '<!@(python cups_config_helper.py --cflags <(sysroot))',
292 ['OS == "android"', {
295 # GN: //printing:printing_jni_headers
296 'target_name': 'printing_jni_headers',
299 'android/java/src/org/chromium/printing/PrintingContext.java',
302 'jni_gen_package': 'printing',
304 'includes': [ '../build/jni_generator.gypi' ],
307 # GN: //printing:printing_java
308 'target_name': 'printing_java',
311 'java_in_dir': '../printing/android/java',
314 '../base/base.gyp:base_java',
316 'includes': [ '../build/java.gypi' ],
320 ['test_isolation_mode != "noop"', {
323 'target_name': 'printing_unittests_run',
326 'printing_unittests',
329 '../build/isolate.gypi',
332 'printing_unittests.isolate',