Blind fix macOS build
[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.cc',
15 'advanced-exif.h',
16 'archives.cc',
17 'archives.h',
18 'bar.cc',
19 'bar.h',
20 'bar-comment.cc',
21 'bar-comment.h',
22 'bar-exif.cc',
23 'bar-exif.h',
24 'bar-histogram.cc',
25 'bar-histogram.h',
26 'bar-keywords.cc',
27 'bar-keywords.h',
28 'bar-rating.cc',
29 'bar-rating.h',
30 'bar-sort.cc',
31 'bar-sort.h',
32 'cache.cc',
33 'cache.h',
34 'cache-loader.cc',
35 'cache-loader.h',
36 'cache-maint.cc',
37 'cache-maint.h',
38 'cellrenderericon.cc',
39 'cellrenderericon.h',
40 'collect.cc',
41 'collect.h',
42 'collect-dlg.cc',
43 'collect-dlg.h',
44 'collect-io.cc',
45 'collect-io.h',
46 'collect-table.cc',
47 'collect-table.h',
48 'color-man.cc',
49 'color-man.h',
50 'compat.cc',
51 'compat.h',
52 'debug.cc',
53 'debug.h',
54 'desktop-file.cc',
55 'desktop-file.h',
56 'dnd.cc',
57 'dnd.h',
58 'dupe.cc',
59 'dupe.h',
60 'editors.cc',
61 'editors.h',
62 'exif-common.cc',
63 'exif.h',
64 'filecache.cc',
65 'filecache.h',
66 'filedata.cc',
67 'filedata.h',
68 'filefilter.cc',
69 'filefilter.h',
70 'fullscreen.cc',
71 'fullscreen.h',
72 'histogram.cc',
73 'histogram.h',
74 'history-list.cc',
75 'history-list.h',
76 'image.cc',
77 'image.h',
78 'image-load.cc',
79 'image-load.h',
80 'image-load-collection.cc',
81 'image-load-collection.h',
82 'image-load-dds.cc',
83 'image-load-dds.h',
84 'image-load-external.cc',
85 'image-load-external.h',
86 'image-load-gdk.cc',
87 'image-load-gdk.h',
88 'image-load-libraw.cc',
89 'image-load-libraw.h',
90 'image-load-psd.cc',
91 'image-load-psd.h',
92 'image-load-svgz.cc',
93 'image-load-svgz.h',
94 'image-load-zxscr.cc',
95 'image-load-zxscr.h',
96 'image-overlay.cc',
97 'image-overlay.h',
98 'img-view.cc',
99 'img-view.h',
100 'intl.h',
101 'jpeg-parser.cc',
102 'jpeg-parser.h',
103 'keymap-template.cc',
104 'keymap-template.h',
105 'layout.cc',
106 'layout.h',
107 'layout-config.cc',
108 'layout-config.h',
109 'layout-image.cc',
110 'layout-image.h',
111 'layout-util.cc',
112 'layout-util.h',
113 'logwindow.cc',
114 'logwindow.h',
115 'main.cc',
116 'main.h',
117 'main-defines.h',
118 'md5-util.cc',
119 'md5-util.h',
120 'menu.cc',
121 'menu.h',
122 'metadata.cc',
123 'metadata.h',
124 'misc.cc',
125 'misc.h',
126 'options.cc',
127 'options.h',
128 'osd.cc',
129 'osd.h',
130 'pan-view.h',
131 'pixbuf-renderer.cc',
132 'pixbuf-renderer.h',
133 'pixbuf-util.cc',
134 'pixbuf-util.h',
135 'preferences.cc',
136 'preferences.h',
137 'print.cc',
138 'print.h',
139 'rcfile.cc',
140 'rcfile.h',
141 'remote.cc',
142 'remote.h',
143 'renderer-tiles.cc',
144 'renderer-tiles.h',
145 'search-and-run.cc',
146 'search-and-run.h',
147 'search.cc',
148 'search.h',
149 'secure-save.cc',
150 'secure-save.h',
151 'shortcuts.cc',
152 'shortcuts.h',
153 'similar.cc',
154 'similar.h',
155 'slideshow.cc',
156 'slideshow.h',
157 'thumb.cc',
158 'thumb.h',
159 'thumb-standard.cc',
160 'thumb-standard.h',
161 'toolbar.cc',
162 'toolbar.h',
163 'trash.cc',
164 'trash.h',
165 'typedefs.h',
166 'ui-bookmark.cc',
167 'ui-bookmark.h',
168 'ui-fileops.cc',
169 'ui-fileops.h',
170 'ui-help.cc',
171 'ui-help.h',
172 'ui-menu.cc',
173 'ui-menu.h',
174 'ui-misc.cc',
175 'ui-misc.h',
176 'ui-pathsel.cc',
177 'ui-pathsel.h',
178 'ui-tabcomp.cc',
179 'ui-tabcomp.h',
180 'ui-tree-edit.cc',
181 'ui-tree-edit.h',
182 'ui-utildlg.cc',
183 'ui-utildlg.h',
184 'uri-utils.cc',
185 'uri-utils.h',
186 'utilops.cc',
187 'utilops.h',
188 'view-dir.cc',
189 'view-dir.h',
190 'view-dir-list.cc',
191 'view-dir-list.h',
192 'view-dir-tree.cc',
193 'view-dir-tree.h',
194 'view-file.h',
195 'window.cc',
196 'window.h')
197
198 if conf_data.get('HAVE_DJVU', 0) == 1
199     main_sources += files(
200         'image-load-djvu.cc',
201         'image-load-djvu.h',
202     )
203 endif
204
205 if conf_data.get('HAVE_EXIV2', 0) == 1
206     main_sources += files(
207         'exiv2.cc',
208     )
209 else
210     main_sources += files(
211         'exif.cc',
212         'exif-int.h',
213         'format-canon.cc',
214         'format-canon.h',
215         'format-fuji.cc',
216         'format-fuji.h',
217         'format-nikon.cc',
218         'format-nikon.h',
219         'format-olympus.cc',
220         'format-olympus.h',
221         'format-raw.cc',
222         'format-raw.h',
223     )
224 endif
225
226 if conf_data.get('HAVE_FFMPEGTHUMBNAILER', 0) == 1
227     main_sources += files(
228         'image-load-ffmpegthumbnailer.cc',
229         'image-load-ffmpegthumbnailer.h',
230     )
231 endif
232
233 if conf_data.get('HAVE_HEIF', 0) == 1
234     main_sources += files(
235         'image-load-heif.cc',
236         'image-load-heif.h',
237     )
238 endif
239
240 if conf_data.get('HAVE_J2K', 0) == 1
241     main_sources += files(
242         'image-load-j2k.cc',
243         'image-load-j2k.h',
244     )
245 endif
246
247 if conf_data.get('HAVE_JPEG', 0) == 1
248     main_sources += files(
249         'image-load-jpeg.cc',
250         'image-load-jpeg.h',
251     )
252
253     if conf_data.get('HAVE_RAW', 0) == 0
254         main_sources += files(
255             'image-load-cr3.cc',
256             'image-load-cr3.h',
257         )
258     endif
259 endif
260
261 if conf_data.get('HAVE_JPEGXL', 0) == 1
262     main_sources += files(
263         'image-load-jpegxl.cc',
264         'image-load-jpegxl.h',
265     )
266 endif
267
268 if conf_data.get('HAVE_LIBCHAMPLAIN', 0) == 1 and conf_data.get('HAVE_LIBCHAMPLAIN_GTK', 0) == 1
269     main_sources += files(
270         'bar-gps.cc',
271         'bar-gps.h',
272     )
273 endif
274
275 if conf_data.get('HAVE_LUA', 0) == 1
276     main_sources += files(
277         'glua.h',
278         'lua.cc',
279     )
280 endif
281
282 if conf_data.get('HAVE_PDF', 0) == 1
283     main_sources += files(
284         'image-load-pdf.cc',
285         'image-load-pdf.h',
286     )
287 endif
288
289 if conf_data.get('HAVE_TIFF', 0) == 1
290     main_sources += files(
291         'image-load-tiff.cc',
292         'image-load-tiff.h',
293     )
294 endif
295
296 if conf_data.get('HAVE_WEBP', 0) == 1
297     main_sources += files(
298         'image-load-webp.cc',
299         'image-load-webp.h',
300     )
301 endif
302
303 project_sources += main_sources
304
305 subdir('authors')
306 subdir('icons')
307 subdir('pan-view')
308 subdir('third-party')
309 subdir('ui')
310 subdir('view-file')
311
312 gq_marshal = gnome.genmarshal('gq-marshal', prefix : 'gq_marshal', sources : 'gq-marshal.list')
313
314 project_sources += gq_marshal[1]
315
316 gq_marshal_pragma_sh = find_program('gq-marshal-pragma.sh', dirs : scriptsdir)
317
318 gq_marshal_pragma = custom_target('gq-marshal-pragma',
319                     input : gq_marshal[0],
320                     output : 'gq-marshal-pragma.c',
321                     command : [gq_marshal_pragma_sh, '@INPUT@', '@OUTPUT@'])
322
323 project_sources += gq_marshal_pragma
324
325 if conf_data.get('HAVE_LCMS', 0) == 1
326     xxd_sh = find_program('generate-ClayRGB1998-icc-h.sh', dirs : join_paths(meson.project_source_root(), 'scripts'))
327
328     ClayRGB1998_icc_h = custom_target('ClayRGB1998',
329                         input: 'ClayRGB1998.icc',
330                         output : 'ClayRGB1998_icc.h',
331                         command : [xxd_sh, '@INPUT@', '@OUTPUT@'])
332
333     project_sources += ClayRGB1998_icc_h
334 endif
335
336 geeqie_exe = executable('geeqie', project_sources,
337 dependencies : [
338 gtk_dep,
339 champlain_dep,
340 champlain_gtk_dep,
341 clutter_dep,
342 clutter_gtk_dep,
343 ddjvuapi_dep,
344 exiv2_dep,
345 glib_dep,
346 gspell_dep,
347 lcms_dep,
348 libarchive_dep,
349 libdw_dep,
350 libexecinfo_dep,
351 libffmpegthumbnailer_dep,
352 libheif_dep,
353 libjpeg_dep,
354 libjxl_dep,
355 libopenjp2_dep,
356 libraw_dep,
357 libunwind_dep,
358 libwebp_dep,
359 lua_dep,
360 poppler_glib_dep,
361 thread_dep,
362 tiff_dep
363 ],
364 include_directories : [configuration_inc], install : true)