chromeos: dbus: add Bluetooth properties support
[chromium-blink-merge.git] / printing / printing.gyp
blob41d779376bbf70ff7ab494582fbff349b0366202
1 # Copyright (c) 2011 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.
6   'variables': {
7     'chromium_code': 1,
8   },
9   'targets': [
10     {
11       'target_name': 'printing',
12       'type': '<(component)',
13       'dependencies': [
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',
21         '../ui/ui.gyp:ui',
22       ],
23       'defines': [
24         'PRINTING_IMPLEMENTATION',
25       ],
26       'include_dirs': [
27         '..',
28       ],
29       'sources': [
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         'emf_win.cc',
36         'emf_win.h',
37         'image.cc',
38         'image_linux.cc',
39         'image_mac.cc',
40         'image_win.cc',
41         'image.h',
42         'metafile.h',
43         'metafile_impl.h',
44         'metafile_skia_wrapper.h',
45         'metafile_skia_wrapper.cc',
46         'page_number.cc',
47         'page_number.h',
48         'page_range.cc',
49         'page_range.h',
50         'page_setup.cc',
51         'page_setup.h',
52         'page_size_margins.cc',
53         'page_size_margins.h',
54         'pdf_metafile_cg_mac.cc',
55         'pdf_metafile_cg_mac.h',
56         'pdf_metafile_skia.h',
57         'pdf_metafile_skia.cc',
58         'printed_document_gtk.cc',
59         'printed_document.cc',
60         'printed_document.h',
61         'printed_document_mac.cc',
62         'printed_document_win.cc',
63         'printed_page.cc',
64         'printed_page.h',
65         'printed_pages_source.h',
66         'printing_context.cc',
67         'printing_context.h',
68         'print_dialog_gtk_interface.h',
69         'print_job_constants.cc',
70         'print_job_constants.h',
71         'print_settings.cc',
72         'print_settings.h',
73         'print_settings_initializer.cc',
74         'print_settings_initializer.h',
75         'print_settings_initializer_gtk.cc',
76         'print_settings_initializer_gtk.h',
77         'print_settings_initializer_mac.cc',
78         'print_settings_initializer_mac.h',
79         'print_settings_initializer_win.cc',
80         'print_settings_initializer_win.h',
81         'units.cc',
82         'units.h',
83       ],
84       'direct_dependent_settings': {
85         'include_dirs': [
86           '..',
87         ],
88       },
89       'conditions': [
90         ['toolkit_uses_gtk == 0',{
91             'sources/': [['exclude', '_cairo\\.cc$']]
92         }],
93         ['OS!="mac"', {'sources/': [['exclude', '_mac\\.(cc|mm?)$']]}],
94         ['OS!="win"', {'sources/': [['exclude', '_win\\.cc$']]
95           }, {  # else: OS=="win"
96             'sources/': [['exclude', '_posix\\.cc$']]
97         }],
98         ['toolkit_uses_gtk == 1', {
99           'dependencies': [
100             # For FT_Init_FreeType and friends.
101             '../build/linux/system.gyp:freetype2',
102             '../build/linux/system.gyp:gtk',
103             '../build/linux/system.gyp:gtkprint',
104           ],
105         }],
106         ['OS=="mac" and use_skia==0', {
107           'sources/': [
108             ['exclude', 'pdf_metafile_skia\\.(cc|h)$'],
109             ['exclude', 'metafile_skia_wrapper\\.(cc|h)$'],
110           ],
111         }],
112         # Mac-Aura does not support printing.
113         ['OS=="mac" and use_aura==1',{
114           'sources!': [
115             'printed_document_mac.cc',
116             'printing_context_mac.mm',
117             'printing_context_mac.h',
118           ],
119         }],
120         ['OS=="mac" and use_aura==0',{
121           'sources': [
122             'printing_context_mac.mm',
123             'printing_context_mac.h',
124           ],
125         }],
126         ['OS=="win"', {
127           'conditions': [
128             ['use_aura==0', {
129               'sources': [
130                 'printing_context_win.cc',
131                 'printing_context_win.h',
132               ],
133           }]],
134           'defines': [
135             # PRINT_BACKEND_AVAILABLE disables the default dummy implementation
136             # of the print backend and enables a custom implementation instead.
137             'PRINT_BACKEND_AVAILABLE',
138           ],
139           'sources': [
140             'backend/win_helper.cc',
141             'backend/win_helper.h',
142             'backend/print_backend_win.cc',
143           ],
144         }],
145         ['chromeos==1 or use_aura==1',{
146           'sources': [
147             'printing_context_no_system_dialog.cc',
148             'printing_context_no_system_dialog.h',
149           ],
150         }],
151         ['use_cups==1', {
152           'dependencies': [
153             'cups',
154           ],
155           'conditions': [
156             ['OS!="mac"', {
157               'dependencies': [
158                 '../build/linux/system.gyp:libgcrypt',
159               ],
160             }],
161           ],
162           'defines': [
163             # PRINT_BACKEND_AVAILABLE disables the default dummy implementation
164             # of the print backend and enables a custom implementation instead.
165             'PRINT_BACKEND_AVAILABLE',
166           ],
167           'sources': [
168             'backend/cups_helper.cc',
169             'backend/cups_helper.h',
170             'backend/print_backend_cups.cc',
171           ],
172         }],
173         ['OS=="linux" and chromeos==1', {
174           'defines': [
175             # PRINT_BACKEND_AVAILABLE disables the default dummy implementation
176             # of the print backend and enables a custom implementation instead.
177             'PRINT_BACKEND_AVAILABLE',
178           ],
179           'sources': [
180             'backend/print_backend_chromeos.cc',
181           ],
182         }],
183         ['toolkit_uses_gtk==1 and chromeos==0', {
184           'sources': [
185             'printing_context_gtk.cc',
186             'printing_context_gtk.h',
187           ],
188         }],
189       ],
190     },
191     {
192       'target_name': 'printing_unittests',
193       'type': 'executable',
194       'dependencies': [
195         'printing',
196         '../testing/gtest.gyp:gtest',
197         '../base/base.gyp:test_support_base',
198         '../ui/ui.gyp:ui',
199       ],
200       'sources': [
201         'emf_win_unittest.cc',
202         'printing_test.h',
203         'page_number_unittest.cc',
204         'page_range_unittest.cc',
205         'page_setup_unittest.cc',
206         'pdf_metafile_cg_mac_unittest.cc',
207         'printed_page_unittest.cc',
208         'run_all_unittests.cc',
209         'units_unittest.cc',
210       ],
211       'conditions': [
212         ['toolkit_uses_gtk == 0', {'sources/': [['exclude', '_gtk_unittest\\.cc$']]}],
213         ['OS!="mac"', {'sources/': [['exclude', '_mac_unittest\\.(cc|mm?)$']]}],
214         ['OS!="win"', {'sources/': [['exclude', '_win_unittest\\.cc$']]}],
215         ['OS=="win" and use_aura == 0', {
216           'sources': [
217             'printing_context_win_unittest.cc',
218           ]
219         }],
220         ['toolkit_uses_gtk == 1', {
221           'dependencies': [
222             '../build/linux/system.gyp:gtk',
223           ],
224           'conditions': [
225             ['linux_use_tcmalloc == 1', {
226               'dependencies': [
227                 '../base/allocator/allocator.gyp:allocator',
228               ],
229             }],
230           ],
231         }],
232       ],
233     },
234     {
235       'target_name': 'cups',
236       'type': 'none',
237       'conditions': [
238         ['use_cups==1', {
239           'direct_dependent_settings': {
240             'defines': [
241               'USE_CUPS',
242             ],
243             'conditions': [
244               ['OS=="mac"', {
245                 'link_settings': {
246                   'libraries': [
247                     '$(SDKROOT)/usr/lib/libcups.dylib',
248                   ]
249                 },
250               }, {
251                 'link_settings': {
252                   'libraries': [
253                     '<!@(python cups_config_helper.py --libs)',
254                   ],
255                 },
256               }],
257               [ 'os_bsd==1', {
258                 'cflags': [
259                   '<!@(python cups_config_helper.py --cflags)',
260                 ],
261               }],
262             ],
263           },
264         }],
265       ],
266     },
267   ],