Debian Codegraph @

libcolord-gtk/meson.build

raw
1 cargs = [
2 '-DG_LOG_DOMAIN="libcolord-gtk"',
3 ]
4
5 colord_gtk_version_h = configure_file(
6 input : 'cd-version.h.in',
7 output : 'cd-version.h',
8 configuration : conf,
9 )
10
11 install_headers(
12 'colord-gtk.h',
13 subdir : 'colord-1',
14 )
15
16 colord_gtk_incdir = include_directories('.')
17
18 install_headers([
19 'cd-sample-widget.h',
20 'cd-sample-window.h',
21 'cd-window.h',
22 'cd-window-sync.h',
23 colord_gtk_version_h,
24 ],
25 subdir : 'colord-1/colord-gtk',
26 )
27
28 pkgg = import('pkgconfig')
29
30 if get_option('gtk2')
31 colord_gtk2 = shared_library(
32 'colord-gtk2',
33 sources : [
34 'cd-window.c',
35 'cd-window-sync.c',
36 ],
37 soversion : lt_current,
38 version : lt_version,
39 dependencies : [
40 glib,
41 gio,
42 gtk2,
43 colord,
44 ],
45 c_args : [
46 cargs,
47 ],
48 include_directories : [
49 root_incdir,
50 ],
51 install : true
52 )
53
54 pkgg.generate(
55 libraries : colord_gtk2,
56 requires : [ 'colord', 'gtk+-2.0' ],
57 subdirs : 'colord-1',
58 version : meson.project_version(),
59 name : 'colord-gtk2',
60 filebase : 'colord-gtk2',
61 description : 'colord-gtk is GTK2 integration for libcolord',
62 )
63 endif
64
65 if get_option('gtk3')
66 colord_gtk = shared_library(
67 'colord-gtk',
68 sources : [
69 'cd-sample-widget.c',
70 'cd-sample-window.c',
71 'cd-window.c',
72 'cd-window-sync.c',
73 ],
74 soversion : lt_current,
75 version : lt_version,
76 dependencies : [
77 glib,
78 gio,
79 gtk3,
80 colord,
81 ],
82 c_args : [
83 cargs,
84 ],
85 include_directories : [
86 root_incdir,
87 ],
88 install : true
89 )
90
91 pkgg.generate(
92 libraries : colord_gtk,
93 requires : [ 'colord', 'gtk+-3.0' ],
94 subdirs : 'colord-1',
95 version : meson.project_version(),
96 name : 'colord-gtk',
97 filebase : 'colord-gtk',
98 description : 'colord-gtk is GTK integration for libcolord',
99 )
100
101 if get_option('introspection')
102 libcolord_gtk_gir = gnome.generate_gir(
103 colord_gtk,
104 sources : [
105 'cd-sample-widget.c',
106 'cd-sample-widget.h',
107 'cd-sample-window.c',
108 'cd-sample-window.h',
109 'cd-window.c',
110 'cd-window.h',
111 'cd-window-sync.c',
112 'cd-window-sync.h',
113 colord_gtk_version_h,
114 ],
115 nsversion : '1.0',
116 namespace : 'ColordGtk',
117 symbol_prefix : 'cd',
118 identifier_prefix : 'Cd',
119 export_packages : 'colord-gtk',
120 extra_args : [
121 '--c-include=colord-gtk.h',
122 '-DCD_COMPILATION',
123 ],
124 dependencies : [
125 glib,
126 gio,
127 gtk3,
128 colord,
129 ],
130 includes : [
131 'GObject-2.0',
132 'Gio-2.0',
133 'Gtk-3.0',
134 'Colord-1.0',
135 ],
136 install : true
137 )
138 endif
139
140 if get_option('vapi')
141 gnome.generate_vapi(
142 'colord-gtk',
143 sources: libcolord_gtk_gir[0],
144 packages: [ 'glib-2.0', 'gio-2.0', 'gtk+-3.0', 'colord' ],
145 install: true,
146 )
147 endif
148
149 if get_option('tests')
150 e = executable(
151 'colord-gtk-test',
152 sources : [
153 'cd-self-test.c',
154 ],
155 include_directories : [
156 root_incdir,
157 ],
158 dependencies : [
159 glib,
160 gio,
161 gtk3,
162 colord,
163 ],
164 link_with : colord_gtk,
165 c_args : [
166 cargs,
167 ]
168 )
169 test('colord-test-private', e)
170 endif
171 endif
172
173 if get_option('gtk4')
174 colord_gtk4 = shared_library(
175 'colord-gtk4',
176 sources : [
177 'cd-sample-widget-gtk4.c',
178 'cd-sample-window-gtk4.c',
179 'cd-window.c',
180 'cd-window-sync.c',
181 ],
182 soversion : lt_current,
183 version : lt_version,
184 dependencies : [
185 glib,
186 gio,
187 gtk4,
188 colord,
189 ],
190 c_args : [
191 cargs,
192 '-DBUILD_COLORD_GTK4',
193 ],
194 include_directories : [
195 root_incdir,
196 ],
197 install : true
198 )
199
200 pkgg.generate(
201 libraries : colord_gtk4,
202 requires : [ 'colord', 'gtk4' ],
203 subdirs : 'colord-1',
204 version : meson.project_version(),
205 name : 'colord-gtk4',
206 filebase : 'colord-gtk4',
207 description : 'colord-gtk4 is GTK4 integration for libcolord',
208 )
209
210 if get_option('tests')
211 e = executable(
212 'colord-gtk4-test',
213 sources : [
214 'cd-self-test-gtk4.c',
215 ],
216 include_directories : [
217 root_incdir,
218 ],
219 dependencies : [
220 glib,
221 gio,
222 gtk4,
223 colord,
224 ],
225 link_with : colord_gtk4,
226 c_args : [
227 cargs,
228 ]
229 )
230 test('colord-gtk4-test-private', e)
231 endif
232
233 endif