Change configuration system from Autotools to Meson
[geeqie.git] / src / meson.build
1 # This file is a part of Geeqie project (https://www.geeqie.org/).
2 # Copyright (C) 2008 - 2022 The Geeqie Team
3 #
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13
14 main_sources = files('advanced_exif.c',
15 'advanced_exif.h',
16 'bar.c',
17 'bar_comment.c',
18 'bar_comment.h',
19 'bar_exif.c',
20 'bar_exif.h',
21 'bar_gps.c',
22 'bar_gps.h',
23 'bar.h',
24 'bar_histogram.c',
25 'bar_histogram.h',
26 'bar_keywords.c',
27 'bar_keywords.h',
28 'bar_rating.c',
29 'bar_rating.h',
30 'bar_sort.c',
31 'bar_sort.h',
32 'cache.c',
33 'cache.h',
34 'cache-loader.c',
35 'cache-loader.h',
36 'cache_maint.c',
37 'cache_maint.h',
38 'cellrenderericon.c',
39 'cellrenderericon.h',
40 'collect.c',
41 'collect-dlg.c',
42 'collect-dlg.h',
43 'collect.h',
44 'collect-io.c',
45 'collect-io.h',
46 'collect-table.c',
47 'collect-table.h',
48 'color-man.c',
49 'color-man.h',
50 'compat.c',
51 'compat.h',
52 'debug.c',
53 'debug.h',
54 'desktop_file.c',
55 'desktop_file.h',
56 'dnd.c',
57 'dnd.h',
58 'dupe.c',
59 'dupe.h',
60 'editors.c',
61 'editors.h',
62 'exif.c',
63 'exif-common.c',
64 'exif.h',
65 'exif-int.h',
66 'exiv2.cc',
67 'filecache.c',
68 'filecache.h',
69 'filedata.c',
70 'filedata.h',
71 'filefilter.c',
72 'filefilter.h',
73 'format_canon.c',
74 'format_canon.h',
75 'format_fuji.c',
76 'format_fuji.h',
77 'format_nikon.c',
78 'format_nikon.h',
79 'format_olympus.c',
80 'format_olympus.h',
81 'format_raw.c',
82 'format_raw.h',
83 'fullscreen.c',
84 'fullscreen.h',
85 'glua.h',
86 'histogram.c',
87 'histogram.h',
88 'history_list.c',
89 'history_list.h',
90 'image.c',
91 'image.h',
92 'image-load.c',
93 'image_load_collection.c',
94 'image_load_collection.h',
95 'image_load_cr3.c',
96 'image_load_cr3.h',
97 'image_load_dds.c',
98 'image_load_dds.h',
99 'image_load_djvu.c',
100 'image_load_djvu.h',
101 'image_load_external.c',
102 'image_load_external.h',
103 'image_load_ffmpegthumbnailer.c',
104 'image_load_ffmpegthumbnailer.h',
105 'image_load_gdk.c',
106 'image_load_gdk.h',
107 'image-load.h',
108 'image_load_heif.c',
109 'image_load_heif.h',
110 'image_load_j2k.c',
111 'image_load_j2k.h',
112 'image_load_jpeg.c',
113 'image_load_jpeg.h',
114 'image_load_jpegxl.c',
115 'image_load_jpegxl.h',
116 'image_load_libraw.c',
117 'image_load_libraw.h',
118 'image_load_pdf.c',
119 'image_load_pdf.h',
120 'image_load_psd.c',
121 'image_load_psd.h',
122 'image_load_svgz.c',
123 'image_load_svgz.h',
124 'image_load_tiff.c',
125 'image_load_tiff.h',
126 'image_load_webp.c',
127 'image_load_webp.h',
128 'image_load_zxscr.c',
129 'image_load_zxscr.h',
130 'image-overlay.c',
131 'image-overlay.h',
132 'img-view.c',
133 'img-view.h',
134 'intl.h',
135 'jpeg_parser.c',
136 'jpeg_parser.h',
137 'keymap_template.c',
138 'keymap_template.h',
139 'layout.c',
140 'layout_config.c',
141 'layout_config.h',
142 'layout.h',
143 'layout_image.c',
144 'layout_image.h',
145 'layout_util.c',
146 'layout_util.h',
147 'lirc.c',
148 'lirc.h',
149 'logwindow.c',
150 'logwindow.h',
151 'lua.c',
152 'main.c',
153 'main.h',
154 'md5-util.c',
155 'md5-util.h',
156 'menu.c',
157 'menu.h',
158 'metadata.c',
159 'metadata.h',
160 'misc.c',
161 'misc.h',
162 'options.c',
163 'options.h',
164 'osd.c',
165 'osd.h',
166 'pan-view.h',
167 'pixbuf-renderer.c',
168 'pixbuf-renderer.h',
169 'pixbuf_util.c',
170 'pixbuf_util.h',
171 'preferences.c',
172 'preferences.h',
173 'print.c',
174 'print.h',
175 'rcfile.c',
176 'rcfile.h',
177 'remote.c',
178 'remote.h',
179 'renderer-clutter.c',
180 'renderer-clutter.h',
181 'renderer-tiles.c',
182 'renderer-tiles.h',
183 'search_and_run.c',
184 'search_and_run.h',
185 'search.c',
186 'search.h',
187 'secure_save.c',
188 'secure_save.h',
189 'shortcuts.c',
190 'shortcuts.h',
191 'similar.c',
192 'similar.h',
193 'slideshow.c',
194 'slideshow.h',
195 'thumb.c',
196 'thumb.h',
197 'thumb_standard.c',
198 'thumb_standard.h',
199 'toolbar.c',
200 'toolbar.h',
201 'trash.c',
202 'trash.h',
203 'typedefs.h',
204 'ui_bookmark.c',
205 'ui_bookmark.h',
206 'ui_fileops.c',
207 'ui_fileops.h',
208 'ui_help.c',
209 'ui_help.h',
210 'ui_menu.c',
211 'ui_menu.h',
212 'ui_misc.c',
213 'ui_misc.h',
214 'ui_pathsel.c',
215 'ui_pathsel.h',
216 'ui_spinner.c',
217 'ui_spinner.h',
218 'ui_tabcomp.c',
219 'ui_tabcomp.h',
220 'ui_tree_edit.c',
221 'ui_tree_edit.h',
222 'ui_utildlg.c',
223 'ui_utildlg.h',
224 'uri_utils.c',
225 'uri_utils.h',
226 'utilops.c',
227 'utilops.h',
228 'view_dir.c',
229 'view_dir.h',
230 'view_dir_list.c',
231 'view_dir_list.h',
232 'view_dir_tree.c',
233 'view_dir_tree.h',
234 'view_file.h',
235 'whereami.c',
236 'whereami.h',
237 'window.c',
238 'window.h',
239 'zonedetect.c',
240 'zonedetect.h')
241
242 project_sources += main_sources
243
244 subdir('icons')
245 subdir('pan-view')
246 subdir('view_file')
247
248 gqmarshal = gnome.genmarshal('gq-marshal', prefix : 'gq_marshal', sources : 'gq-marshal.list')
249 project_sources += gqmarshal[0]
250 project_sources += gqmarshal[1]
251
252 icon_pairs = [
253 'icon_spinner', files('ui_spinner.png'),
254 'icon_tabcomp', files('ui_tabcomp.png'),
255 ]
256
257 ui_icons_h = custom_target(output : 'ui_icons.h',
258                 command : [gdk_pixbuf_csource, '--raw', '--extern', '--build-list', icon_pairs],
259                 capture : true)
260
261 project_sources += ui_icons_h
262
263 xxd = find_program('xxd')
264 run_command(xxd, '-i',
265             'ClayRGB1998.icc',
266             join_paths(meson.project_build_root(), 'src', 'ClayRGB1998_icc.h'),
267             check : true)
268
269 project_sources += 'ClayRGB1998_icc.h'
270
271 executable('geeqie', project_sources,
272 dependencies : [
273 champlain_dep,
274 champlain_gtk_dep,
275 clutter_dep,
276 clutter_gtk_dep,
277 ddjvuapi_dep,
278 exiv2_dep,
279 glib_dep,
280 gspell_dep,
281 gtk_dep,
282 lcms_dep,
283 libarchive_dep,
284 libffmpegthumbnailer_dep,
285 libheif_dep,
286 libjpeg_dep,
287 libjxl_dep,
288 libopenjp2_dep,
289 libraw_dep,
290 libwebp_dep,
291 lirc_dep,
292 lua_dep,
293 poppler_glib_dep,
294 thread_dep,
295 tiff_dep
296 ],
297 include_directories : [configuration_inc], install : true)