Bug 1654678 Part 4 - Make GTK printer enumeration use the unified CUPS code r=jwatt...
[gecko.git] / widget / gtk / moz.build
blob42699478a5e7138dff44a97181ec3a388ed5373f
1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2 # vim: set filetype=python:
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 with Files("**"):
8     BUG_COMPONENT = ("Core", "Widget: Gtk")
10 with Files("*CompositorWidget*"):
11     BUG_COMPONENT = ("Core", "Graphics")
13 with Files("*WindowSurface*"):
14     BUG_COMPONENT = ("Core", "Graphics")
16 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk':
17     DIRS += ['mozgtk']
19 if CONFIG['MOZ_WAYLAND']:
20     DIRS += ['wayland', 'mozwayland']
22 EXPORTS += [
23     'MozContainer.h',
24     'nsGTKToolkit.h',
25     'nsIImageToPixbuf.h',
28 EXPORTS.mozilla += [
29     'WidgetUtilsGtk.h'
32 UNIFIED_SOURCES += [
33     'IMContextWrapper.cpp',
34     'MozContainer.cpp',
35     'MPRISServiceHandler.cpp',
36     'NativeKeyBindings.cpp',
37     'nsAppShell.cpp',
38     'nsBidiKeyboard.cpp',
39     'nsColorPicker.cpp',
40     'nsFilePicker.cpp',
41     'nsGtkKeyUtils.cpp',
42     'nsImageToPixbuf.cpp',
43     'nsLookAndFeel.cpp',
44     'nsNativeBasicThemeGTK.cpp',
45     'nsNativeThemeGTK.cpp',
46     'nsSound.cpp',
47     'nsToolkit.cpp',
48     'nsWidgetFactory.cpp',
49     'ProcInfo.cpp',
50     'ScreenHelperGTK.cpp',
51     'TaskbarProgress.cpp',
52     'WakeLockListener.cpp',
53     'WidgetTraceEvent.cpp',
54     'WidgetUtilsGtk.cpp',
57 SOURCES += [
58     'MediaKeysEventSourceFactory.cpp',
59     'nsWindow.cpp', # conflicts with X11 headers
60     'WaylandVsyncSource.cpp', # conflicts with X11 headers
63 if CONFIG['MOZ_X11']:
64     UNIFIED_SOURCES += [
65         'CompositorWidgetChild.cpp',
66         'CompositorWidgetParent.cpp',
67         'GtkCompositorWidget.cpp',
68         'InProcessGtkCompositorWidget.cpp',
69         'nsUserIdleServiceGTK.cpp',
70     ]
71     EXPORTS.mozilla.widget += [
72         'CompositorWidgetChild.h',
73         'CompositorWidgetParent.h',
74         'GtkCompositorWidget.h',
75         'InProcessGtkCompositorWidget.h',
76     ]
78 if CONFIG['NS_PRINTING']:
79     UNIFIED_SOURCES += [
80         'nsDeviceContextSpecG.cpp',
81         'nsPrintDialogGTK.cpp',
82         'nsPrintSettingsGTK.cpp',
83         'nsPrintSettingsServiceGTK.cpp',
84         'PSPrinters.cpp',
85     ]
87 if CONFIG['MOZ_X11']:
88     UNIFIED_SOURCES += [
89         'nsClipboard.cpp',
90         'nsClipboardX11.cpp',
91         'nsDragService.cpp',
92         'WindowSurfaceProvider.cpp',
93         'WindowSurfaceX11.cpp',
94         'WindowSurfaceX11Image.cpp',
95         'WindowSurfaceXRender.cpp',
96     ]
97     EXPORTS.mozilla.widget += [
98         'WindowSurfaceProvider.h',
99     ]
101 if CONFIG['MOZ_WAYLAND']:
102     UNIFIED_SOURCES += [
103         'DMABufLibWrapper.cpp',
104         'DMABufSurface.cpp',
105         'MozContainerWayland.cpp',
106         'nsClipboardWayland.cpp',
107         'nsWaylandDisplay.cpp',
108         'WindowSurfaceWayland.cpp',
109     ]
110     EXPORTS.mozilla.widget += [
111         'DMABufLibWrapper.h',
112         'DMABufSurface.h',
113         'MozContainerWayland.h',
114         'nsWaylandDisplay.h',
115     ]
117 if CONFIG['ACCESSIBILITY']:
118     UNIFIED_SOURCES += [
119         'maiRedundantObjectFactory.c',
120     ]
122 UNIFIED_SOURCES += [
123     'gtk3drawing.cpp',
124     'nsApplicationChooser.cpp',
125     'WidgetStyleCache.cpp',
128 XPCOM_MANIFESTS += [
129     'components.conf',
132 include('/ipc/chromium/chromium-config.mozbuild')
134 FINAL_LIBRARY = 'xul'
136 LOCAL_INCLUDES += [
137     '/layout/base',
138     '/layout/forms',
139     '/layout/generic',
140     '/layout/xul',
141     '/other-licenses/atk-1.0',
142     '/third_party/cups/include',
143     '/widget',
144     '/widget/headless',
147 if CONFIG['MOZ_X11']:
148     LOCAL_INCLUDES += [
149         '/widget/x11',
150     ]
152 DEFINES['CAIRO_GFX'] = True
154 DEFINES['MOZ_APP_NAME'] = '"%s"' % CONFIG['MOZ_APP_NAME']
156 # When building with GTK3, the widget code always needs to use
157 # system Cairo headers, regardless of whether we are also linked
158 # against and using in-tree Cairo. By not using in-tree Cairo
159 # headers, we avoid picking up our renamed symbols, and instead
160 # use only system Cairo symbols that GTK3 uses. This allows that
161 # any Cairo objects created can be freely passed back and forth
162 # between the widget code and GTK3.
163 if not (CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk' and CONFIG['MOZ_TREE_CAIRO']):
164     CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
166 CFLAGS += CONFIG['TK_CFLAGS']
167 CXXFLAGS += CONFIG['TK_CFLAGS']
169 if CONFIG['MOZ_WAYLAND']:
170     CFLAGS += CONFIG['MOZ_WAYLAND_CFLAGS']
171     CXXFLAGS += CONFIG['MOZ_WAYLAND_CFLAGS']
173 if CONFIG['MOZ_ENABLE_DBUS']:
174     CXXFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS']
176 CXXFLAGS += ['-Wno-error=shadow']