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 ['OS=="mac" and use_skia==0', {
118 ['exclude', 'pdf_metafile_skia\\.(cc|h)$'],
119 ['exclude', 'metafile_skia_wrapper\\.(cc|h)$'],
122 # Mac-Aura does not support printing.
123 ['OS=="mac" and use_aura==1',{
125 'printed_document_mac.cc',
126 'printing_context_mac.mm',
127 'printing_context_mac.h',
130 ['OS=="mac" and use_aura==0',{
132 'printing_context_mac.mm',
133 'printing_context_mac.h',
138 '../win8/win8.gyp:win8_util',
143 'printing_context_win.cc',
144 'printing_context_win.h',
148 # PRINT_BACKEND_AVAILABLE disables the default dummy implementation
149 # of the print backend and enables a custom implementation instead.
150 'PRINT_BACKEND_AVAILABLE',
153 'backend/win_helper.cc',
154 'backend/win_helper.h',
155 'backend/print_backend_win.cc',
158 'print_destination_none.cc',
161 ['chromeos==1 or use_aura==1',{
163 'printing_context_no_system_dialog.cc',
164 'printing_context_no_system_dialog.h',
174 '../build/linux/system.gyp:libgcrypt',
179 # PRINT_BACKEND_AVAILABLE disables the default dummy implementation
180 # of the print backend and enables a custom implementation instead.
181 'PRINT_BACKEND_AVAILABLE',
184 'backend/cups_helper.cc',
185 'backend/cups_helper.h',
186 'backend/print_backend_cups.cc',
189 ['OS=="linux" and chromeos==1', {
191 # PRINT_BACKEND_AVAILABLE disables the default dummy implementation
192 # of the print backend and enables a custom implementation instead.
193 'PRINT_BACKEND_AVAILABLE',
196 'backend/print_backend_chromeos.cc',
199 ['toolkit_uses_gtk==1 and chromeos==0', {
201 'printing_context_gtk.cc',
202 'printing_context_gtk.h',
208 'target_name': 'printing_unittests',
209 'type': 'executable',
212 '../testing/gtest.gyp:gtest',
213 '../base/base.gyp:test_support_base',
217 'backend/print_backend_unittest.cc',
218 'emf_win_unittest.cc',
220 'page_number_unittest.cc',
221 'page_range_unittest.cc',
222 'page_setup_unittest.cc',
223 'pdf_metafile_cg_mac_unittest.cc',
224 'printed_page_unittest.cc',
225 'run_all_unittests.cc',
229 ['enable_printing!=1', {
232 ['include', 'run_all_unittests.cc'],
235 ['toolkit_uses_gtk == 0', {'sources/': [['exclude', '_gtk_unittest\\.cc$']]}],
236 ['OS!="mac"', {'sources/': [['exclude', '_mac_unittest\\.(cc|mm?)$']]}],
237 ['OS!="win"', {'sources/': [['exclude', '_win_unittest\\.cc$']]}],
238 ['OS=="win" and use_aura == 0', {
240 'printing_context_win_unittest.cc',
248 'backend/cups_helper_unittest.cc',
251 ['toolkit_uses_gtk == 1', {
253 '../build/linux/system.gyp:gtk',
256 [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
258 ['linux_use_tcmalloc == 1', {
260 '../base/allocator/allocator.gyp:allocator',
266 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
267 'msvs_disabled_warnings': [ 4267, ],
270 'target_name': 'cups',
274 'direct_dependent_settings': {
282 '$(SDKROOT)/usr/lib/libcups.dylib',
288 '<!@(python cups_config_helper.py --libs)',
294 '<!@(python cups_config_helper.py --cflags)',