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 '../build/temp_gyp/googleurl.gyp:googleurl',
18 '../skia/skia.gyp:skia',
19 '../third_party/icu/icu.gyp:icui18n',
20 '../third_party/icu/icu.gyp:icuuc',
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',
46 'metafile_skia_wrapper.h',
47 'metafile_skia_wrapper.cc',
54 'page_size_margins.cc',
55 'page_size_margins.h',
56 'pdf_metafile_cg_mac.cc',
57 'pdf_metafile_cg_mac.h',
58 'pdf_metafile_skia.h',
59 'pdf_metafile_skia.cc',
60 'print_destination_interface.h',
61 'print_destination_none.cc',
62 'print_destination_win.cc',
63 'printed_document_gtk.cc',
64 'printed_document.cc',
66 'printed_document_mac.cc',
67 'printed_document_win.cc',
70 'printed_pages_source.h',
71 'printing_context.cc',
73 'print_dialog_gtk_interface.h',
74 'print_job_constants.cc',
75 'print_job_constants.h',
78 'print_settings_initializer.cc',
79 'print_settings_initializer.h',
80 'print_settings_initializer_gtk.cc',
81 'print_settings_initializer_gtk.h',
82 'print_settings_initializer_mac.cc',
83 'print_settings_initializer_mac.h',
84 'print_settings_initializer_win.cc',
85 'print_settings_initializer_win.h',
89 'direct_dependent_settings': {
95 ['enable_printing!=1', {
100 ['toolkit_uses_gtk == 0',{
101 'sources/': [['exclude', '_cairo\\.cc$']]
103 ['OS!="mac"', {'sources/': [['exclude', '_mac\\.(cc|mm?)$']]}],
104 ['OS!="win"', {'sources/': [['exclude', '_win\\.cc$']]
105 }, { # else: OS=="win"
106 'sources/': [['exclude', '_posix\\.cc$']]
108 ['toolkit_uses_gtk == 1', {
110 # For FT_Init_FreeType and friends.
111 '../build/linux/system.gyp:freetype2',
112 '../build/linux/system.gyp:gtk',
113 '../build/linux/system.gyp:gtkprint',
116 # Mac-Aura does not support printing.
117 ['OS=="mac" and use_aura==1',{
119 'printed_document_mac.cc',
120 'printing_context_mac.mm',
121 'printing_context_mac.h',
124 ['OS=="mac" and use_aura==0',{
126 'printing_context_mac.mm',
127 'printing_context_mac.h',
132 '../win8/win8.gyp:win8_util',
137 'printing_context_win.cc',
138 'printing_context_win.h',
142 # PRINT_BACKEND_AVAILABLE disables the default dummy implementation
143 # of the print backend and enables a custom implementation instead.
144 'PRINT_BACKEND_AVAILABLE',
147 'backend/win_helper.cc',
148 'backend/win_helper.h',
149 'backend/print_backend_win.cc',
152 'print_destination_none.cc',
155 ['chromeos==1 or use_aura==1',{
157 'printing_context_no_system_dialog.cc',
158 'printing_context_no_system_dialog.h',
168 '../build/linux/system.gyp:libgcrypt',
173 # PRINT_BACKEND_AVAILABLE disables the default dummy implementation
174 # of the print backend and enables a custom implementation instead.
175 'PRINT_BACKEND_AVAILABLE',
178 'backend/cups_helper.cc',
179 'backend/cups_helper.h',
180 'backend/print_backend_cups.cc',
183 ['OS=="linux" and chromeos==1', {
185 # PRINT_BACKEND_AVAILABLE disables the default dummy implementation
186 # of the print backend and enables a custom implementation instead.
187 'PRINT_BACKEND_AVAILABLE',
190 'backend/print_backend_chromeos.cc',
193 ['toolkit_uses_gtk==1 and chromeos==0', {
195 'printing_context_gtk.cc',
196 'printing_context_gtk.h',
202 'target_name': 'printing_unittests',
203 'type': 'executable',
206 '../testing/gtest.gyp:gtest',
207 '../base/base.gyp:test_support_base',
211 'backend/print_backend_unittest.cc',
212 'emf_win_unittest.cc',
214 'page_number_unittest.cc',
215 'page_range_unittest.cc',
216 'page_setup_unittest.cc',
217 'pdf_metafile_cg_mac_unittest.cc',
218 'printed_page_unittest.cc',
219 'run_all_unittests.cc',
223 ['enable_printing!=1', {
226 ['include', 'run_all_unittests.cc'],
229 ['toolkit_uses_gtk == 0', {'sources/': [['exclude', '_gtk_unittest\\.cc$']]}],
230 ['OS!="mac"', {'sources/': [['exclude', '_mac_unittest\\.(cc|mm?)$']]}],
231 ['OS!="win"', {'sources/': [['exclude', '_win_unittest\\.cc$']]}],
232 ['OS=="win" and use_aura == 0', {
234 'printing_context_win_unittest.cc',
242 'backend/cups_helper_unittest.cc',
245 ['toolkit_uses_gtk == 1', {
247 '../build/linux/system.gyp:gtk',
250 [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
252 ['linux_use_tcmalloc == 1', {
254 '../base/allocator/allocator.gyp:allocator',
260 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
261 'msvs_disabled_warnings': [ 4267, ],
264 'target_name': 'cups',
268 'direct_dependent_settings': {
276 '$(SDKROOT)/usr/lib/libcups.dylib',
282 '<!@(python cups_config_helper.py --libs)',
288 '<!@(python cups_config_helper.py --cflags)',