meson: only calculate the version once
[geeqie.git] / 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 # Meson default directories used in this project:
15 # prefix - /usr/local
16 # bindir - bin
17 # datadir - share
18
19 # Meson core options:
20 # buildtype
21 # debug
22
23 # Project expanded default directories:
24 # prefix        /usr/local/
25 # bindir        /usr/local/bin                          geeqie executable
26 # gq_bindir     /usr/local/lib/geeqie               *   plugins scripts
27 # datadir       /usr/local/share/
28 #               /usr/local/share/applications           geeqie.desktop
29 # [gq_]appdir   /usr/local/share/geeqie/            *   template.desktop
30 # desktopdir    /usr/local/share/geeqie/applications    plugin desktop files
31 # appdatadir    /usr/local/share/metainfo               org.geeqie.Geeqie.appdata.xml
32 # icondir       /usr/local/share/pixmaps                geeqie.png icon
33 # [gq_]helpdir  /usr/local/share/doc/geeqie         *   readme files etc.
34 # [gq_]htmldir  /usr/local/share/doc/geeqie/html    *   help files
35 # gq_localedir  /usr/locale/share/locale
36 # mandir1       /usr/local/share/man/man1               man page
37 # podir         project_root/po
38
39 # * See meson_options.txt file
40
41 project(
42     'geeqie',
43     'c',
44     'cpp',
45     version : run_command('./version.sh', check : true).stdout().strip(),
46     license : ['GPL-2.0-or-later'],
47     meson_version : '>=0.53.0',
48     default_options : ['warning_level=3', 'buildtype=debugoptimized']
49 )
50
51 # To inhibit warnings from the generated files icons_inline.h and ui_icons.h
52 add_global_arguments('-Wno-overlength-strings', language : 'c')
53
54 # To compile originally-C files as C++
55 add_global_arguments('-fpermissive', language : 'cpp')
56 add_global_arguments('-Wno-error=deprecated-declarations', language : 'cpp')
57 add_global_arguments('-Wno-error=sign-compare', language : 'cpp')
58 add_global_arguments('-Wno-error=return-type', language : 'cpp')
59 add_global_arguments('-Wno-error=literal-suffix', language : 'cpp')
60 add_global_arguments('-Wno-error=write-strings', language : 'cpp')
61
62 # Project requirements
63 project_sources = []
64 gnome = import('gnome')
65 thread_dep = dependency('threads')
66 cc = meson.get_compiler('c')
67 i18n = import('i18n')
68 configuration_inc = include_directories('.')
69
70 # External programs
71 gdk_pixbuf_csource = find_program('gdk-pixbuf-csource', required : true)
72 glib_genmarshal = find_program('glib-genmarshal', required : true)
73 gnome_doc_tool = find_program('yelp-build', required : false)
74 if gnome_doc_tool.found()
75     summary({'help' : ['Help files created:', true]}, section : 'Documentation', bool_yn : true)
76 else
77     summary({'help' : ['yelp-build not found - Help files created:', false]}, section : 'Documentation', bool_yn : true)
78 endif
79
80 debug = get_option('debug')
81
82 # Note that main.cc sets prefix to the directory above where the executable is run from.
83 # This is to allow AppImages to be used
84
85 # These gq_* variables are paths relative to /prefix/,
86 # and are also used in defines in the source as GQ_*
87 if get_option('gq_appdir') == ''
88     gq_appdir = join_paths(get_option('datadir'), 'geeqie')
89 else
90     gq_appdir = get_option('gq_appdir')
91 endif
92
93 # This is not the same as Meson bindir
94 if get_option('gq_bindir') == ''
95     gq_bindir = 'lib/geeqie'
96 else
97     gq_bindir = get_option('gq_bindir')
98 endif
99
100 if get_option('gq_helpdir') == ''
101     gq_helpdir = join_paths(get_option('datadir'), 'doc/geeqie')
102 else
103     gq_helpdir = get_option('gq_helpdir')
104 endif
105
106 if get_option('gq_htmldir') == ''
107     gq_htmldir = join_paths(get_option('datadir'), 'doc/geeqie/html')
108 else
109     gq_htmldir = get_option('gq_htmldir')
110 endif
111
112 if get_option('gq_localedir') == ''
113     gq_localedir = join_paths(get_option('datadir'), 'locale')
114 else
115     gq_localedir = get_option('gq_localedir')
116 endif
117
118
119 # Set up the absolute directory paths used
120 prefix = get_option('prefix')
121 datadir = join_paths(prefix, get_option('datadir'))
122
123 # Installation paths are absolute
124 appdir = join_paths(prefix, gq_appdir)
125 appdatadir = join_paths(datadir, 'metainfo')
126 desktopdir = join_paths(datadir, meson.project_name(), 'applications')
127 helpdir = join_paths(prefix, gq_helpdir)
128 htmldir = join_paths(prefix, gq_htmldir)
129 icondir = join_paths(datadir, 'pixmaps')
130 mandir1 = join_paths(datadir, 'man', 'man1')
131
132 podir = join_paths(meson.source_root(), 'po')
133
134 summary({'gq_appdir': gq_appdir,
135         'gq_bindir': gq_helpdir,
136         'gq_helpdir': gq_helpdir,
137         'gq_htmldir': gq_htmldir,
138         'gq_localedir': gq_localedir,
139         }, section: 'Directories')
140
141 # Create the define constants used in the sources. Set via config.h.in
142 conf_data = configuration_data()
143 conf_data.set_quoted('VERSION', meson.project_version())
144 conf_data.set('DEBUG', debug)
145
146 gtk_dep = dependency('gtk+-3.0', version : '>=3.22', required: true)
147 glib_dep = dependency('glib-2.0', version : '>=2.52', required: true)
148
149 libarchive_dep = []
150 req_version = '>=3.4.0'
151 option = get_option('archive')
152 if not option.disabled()
153     libarchive_dep = dependency('libarchive', version : req_version, required : get_option('archive'))
154     if libarchive_dep.found()
155         conf_data.set('HAVE_ARCHIVE', 1)
156         summary({'archive' : ['archive files e.g. .zip supported:', true]}, section : 'Configuration', bool_yn : true)
157     else
158         summary({'archive' : ['libarchive ' + req_version + ' not found - archive files e.g. .zip supported::', false]}, section : 'Configuration', bool_yn : true)
159     endif
160 else
161     summary({'archive' : ['disabled - archive files e.g. .zip supported:', false]}, section : 'Configuration', bool_yn : true)
162 endif
163
164 lcms_dep = []
165 req_version = '>=2.0'
166 option = get_option('cms')
167 if not option.disabled()
168     lcms_dep = dependency('lcms2', version : req_version, required : get_option('cms'))
169     if lcms_dep.found()
170         conf_data.set('HAVE_LCMS', 1)
171         conf_data.set('HAVE_LCMS2', 1)
172         summary({'cms' : ['color management supported:', true]}, section : 'Configuration', bool_yn : true)
173     else
174         summary({'cms' : ['lcms2' + req_version + ' not found - color management supported:', false]}, section : 'Configuration', bool_yn : true)
175     endif
176 else
177     summary({'cms' : ['disabled - color management supported:', false]}, section : 'Configuration', bool_yn : true)
178 endif
179
180 ddjvuapi_dep = []
181 req_version = '>=2.5.27'
182 option = get_option('djvu')
183 if not option.disabled()
184     ddjvuapi_dep = dependency('ddjvuapi', version : req_version, required : get_option('djvu'))
185     if ddjvuapi_dep.found()
186         conf_data.set('HAVE_DJVU', 1)
187         summary({'djvu' : ['djvu files supported:', true]}, section : 'Configuration', bool_yn : true)
188     else
189         summary({'djvu' : ['ddjvuapi ' + req_version + ' not found - djvu files supported:', false]}, section : 'Configuration', bool_yn : true)
190     endif
191 else
192     summary({'djvu' : ['disabled - djvu files supported:', false]}, section : 'Configuration', bool_yn : true)
193 endif
194
195 exiv2_dep = []
196 req_version = '>=0.11'
197 option = get_option('exiv2')
198 if not option.disabled()
199     exiv2_dep = dependency('exiv2', version : req_version, required : get_option('exiv2'))
200     if exiv2_dep.found()
201         conf_data.set('HAVE_EXIV2', 1)
202         summary({'exiv2' : ['image metadata processed by exiv2:', true]}, section : 'Configuration', bool_yn : true)
203     else
204         summary({'exiv2' : ['exiv2 ' + req_version + ' not found - image data not processed by exiv2:', false]}, section : 'Configuration', bool_yn : true)
205     endif
206 else
207     summary({'exiv2' : ['disabled - image data processed by exiv2:', false]}, section : 'Configuration', bool_yn : true)
208 endif
209
210 libffmpegthumbnailer_dep = []
211 req_version = '>=2.1.0'
212 option = get_option('videothumbnailer')
213 if not option.disabled()
214     libffmpegthumbnailer_dep = dependency('libffmpegthumbnailer',
215         version : req_version,
216         required : get_option('videothumbnailer'))
217
218     if libffmpegthumbnailer_dep.found()
219         conf_data.set('HAVE_FFMPEGTHUMBNAILER', 1)
220         summary({'videothumbnailer' : ['thumbnails of video files supported:', true]}, section : 'Configuration', bool_yn : true)
221
222         result = cc.has_member('struct video_thumbnailer_struct', 'prefer_embedded_metadata', prefix : '#include <libffmpegthumbnailer/videothumbnailerc.h>')
223         if result
224             conf_data.set('HAVE_FFMPEGTHUMBNAILER_METADATA', 1)
225         endif
226         summary({'fmpegthumbnailer_metadata' : ['fmpegthumbnailer_metadata found:', result]}, section : 'Thumbnailer', bool_yn : true)
227
228         result = cc.has_member('struct image_data_struct', 'image_data_width', prefix : '#include <libffmpegthumbnailer/videothumbnailerc.h>' )
229         if result
230             conf_data.set('HAVE_FFMPEGTHUMBNAILER_RGB', 1)
231         endif
232         summary({'fmpegthumbnailer_rgb' : ['fmpegthumbnailer_rgb found:', result]}, section : 'Thumbnailer', bool_yn : true)
233
234         result = cc.has_function('video_thumbnailer_set_size', dependencies : libffmpegthumbnailer_dep)
235         if result
236             conf_data.set('HAVE_FFMPEGTHUMBNAILER_WH', 1)
237         endif
238         summary({'fmpegthumbnailer_set_size' : ['fmpegthumbnailer_set_size found:', result]}, section : 'Thumbnailer', bool_yn : true)
239     else
240         summary({'videothumbnailer' : ['libvideothumbnailer ' + req_version + ' not found - thumbnails of video files supported', false]}, section : 'Configuration', bool_yn : true)
241     endif
242 else
243     summary({'videothumbnailer' : ['disabled -thumbnails of video files supported', false]}, section : 'Configuration', bool_yn : true)
244 endif
245
246 champlain_dep = []
247 champlain_gtk_dep = []
248 clutter_dep = []
249 clutter_gtk_dep = []
250 req_version_champlain = '>=0.12'
251 req_version_champlain_gtk = '>=0.12'
252 req_version_clutter = '>=1.0'
253 req_version_clutter_gtk = '>=1.0'
254 option = get_option('gps-map')
255 if not option.disabled()
256     champlain_dep = dependency('champlain-0.12', version : req_version_champlain, required : get_option('gps-map'))
257     champlain_gtk_dep = dependency('champlain-gtk-0.12', version : req_version_champlain_gtk, required : get_option('gps-map'))
258     if champlain_dep.found() and champlain_gtk_dep.found()
259         clutter_dep = dependency('clutter-1.0', version : req_version_clutter, required : get_option('gps-map'))
260         clutter_gtk_dep = dependency('clutter-gtk-1.0', version : req_version_clutter_gtk, required : get_option('gps-map'))
261         if clutter_dep.found() and clutter_gtk_dep.found()
262             conf_data.set('HAVE_CLUTTER', 1)
263             conf_data.set('HAVE_LIBCHAMPLAIN', 1)
264             conf_data.set('HAVE_LIBCHAMPLAIN_GTK', 1)
265             summary({'gps-map' : ['GPS map displayed', true]}, section : 'Configuration', bool_yn : true)
266         else
267             if not clutter_dep.found()
268                 summary({'gps-map-clutter' : ['clutter-1.0 ' + req_version_clutter + ' not found - GPS map displayed:', false]}, section : 'Configuration', bool_yn : true)
269             endif
270             if not clutter_gtk_dep.found()
271                 summary({'gps-map-clutter-gtk' : ['clutter-gtk-1.0 ' + req_version_clutter_gtk + ' not found - GPS map displayed:', false]}, section : 'Configuration', bool_yn : true)
272             endif
273         endif
274     else
275         if not champlain_dep.found()
276             summary({'gps-map-champlain' : ['champlain-0.12 ' + req_version_champlain + ' not found - GPS map displayed:', false]}, section : 'Configuration', bool_yn : true)
277         endif
278         if not champlain_gtk_dep.found()
279             summary({'gps-map-champlain-gtk' : ['champlain-gtk-0.12 ' + req_version_champlain_gtk + ' not found - GPS map displayed:', false]}, section : 'Configuration', bool_yn : true)
280         endif
281     endif
282 else
283     summary({'gps-map' : ['disabled - GPS map displayed:', false]}, section : 'Configuration', bool_yn : true)
284 endif
285
286 libheif_dep = []
287 req_version = '>=1.3.2'
288 option = get_option('heif')
289 if not option.disabled()
290     libheif_dep = dependency('libheif', version : req_version, required : get_option('heif'))
291     if libheif_dep.found()
292         conf_data.set('HAVE_HEIF', 1)
293         summary({'heif' : ['heif files supported:', true]}, section : 'Configuration', bool_yn : true)
294     else
295         summary({'heif' : ['libheif ' + req_version + ' not found - heif files supported:', false]}, section : 'Configuration', bool_yn : true)
296     endif
297 else
298     summary({'heif' : ['disabled - heif files supported:', false]}, section : 'Configuration', bool_yn : true)
299 endif
300
301 libopenjp2_dep = []
302 req_version = '>=2.3.0'
303 option = get_option('j2k')
304 if not option.disabled()
305     libopenjp2_dep = dependency('libopenjp2', version : req_version, required : get_option('j2k'))
306     if libopenjp2_dep.found()
307         conf_data.set('HAVE_J2K', 1)
308         summary({'j2k' : ['j2k files supported:', true]}, section : 'Configuration', bool_yn : true)
309     else
310         summary({'j2k' : ['libopenjp2 ' + req_version + ' not found - j2k files supported:', false]}, section : 'Configuration', bool_yn : true)
311     endif
312 else
313     summary({'j2k' : ['disabled - j2k files supported:', false]}, section : 'Configuration', bool_yn : true)
314 endif
315
316 libjpeg_dep = []
317 option = get_option('jpeg')
318 if not option.disabled()
319 libjpeg_dep = dependency('libjpeg', required : get_option('jpeg'))
320     if libjpeg_dep.found()
321         if cc.has_function('jpeg_destroy_decompress', dependencies : libjpeg_dep)
322             conf_data.set('HAVE_JPEG', 1)
323             summary({'jpeg' : ['jpeg files supported:', true]}, section : 'Configuration', bool_yn : true)
324         else
325             summary({'jpeg' : ['jpeg_destroy_decompress not found - jpeg files supported:', false]}, section : 'Configuration', bool_yn : true)
326         endif
327     else
328         summary({'jpeg' : ['libjpeg: not found', false]}, section : 'Configuration', bool_yn : true)
329     endif
330 else
331     summary({'jpeg' : ['disabled - jpeg files supported:', false]}, section : 'Configuration', bool_yn : true)
332 endif
333
334 libjxl_dep = []
335 req_version = '>=0.3.7'
336 option = get_option('jpegxl')
337 if not option.disabled()
338     libjxl_dep = dependency('libjxl', version : req_version, required : get_option('jpegxl'))
339     if libjxl_dep.found()
340         conf_data.set('HAVE_JPEGXL', 1)
341         summary({'jpegxl' : ['jpegxl files supported:', true]}, section : 'Configuration', bool_yn : true)
342     else
343         summary({'jpegxl' : ['libjxl ' + req_version + ' not found - jpegxl files supported:', false]}, section : 'Configuration', bool_yn : true)
344     endif
345 else
346     summary({'jpegxl' : ['disabled - jpegxl files supported:', false]}, section : 'Configuration', bool_yn : true)
347 endif
348
349 libraw_dep = []
350 req_version = '>=0.20'
351 option = get_option('libraw')
352 if not option.disabled()
353     libraw_dep = dependency('libraw', version : req_version, required : get_option('libraw'))
354     if libraw_dep.found()
355         conf_data.set('HAVE_RAW', 1)
356         summary({'libraw' : ['.cr3 files supported:', true]}, section : 'Configuration', bool_yn : true)
357     else
358         summary({'libraw' : ['libraw ' + req_version + ' not found - .cr3 files supported:', false]}, section : 'Configuration', bool_yn : true)
359     endif
360 else
361     summary({'libraw' : ['disabled - .cr3 files supported:', false]}, section : 'Configuration', bool_yn : true)
362 endif
363
364 lua_dep = []
365 req_version = '>=5.3'
366 option = get_option('lua')
367 if not option.disabled()
368     lua_dep = dependency('lua5.3',  version : req_version, required : get_option('lua'))
369     if lua_dep.found()
370         conf_data.set('HAVE_LUA', 1)
371         summary({'lua' : ['lua supported:', true]}, section : 'Configuration', bool_yn : true)
372     else
373         summary({'lua' : ['lua5.3 ' + req_version + ' not found - lua supported:', false]}, section : 'Configuration', bool_yn : true)
374     endif
375 else
376     summary({'lua' : ['disabled - lua supported:', false]}, section : 'Configuration', bool_yn : true)
377 endif
378
379 poppler_glib_dep = []
380 req_version = '>=0.62'
381 option = get_option('pdf')
382 if not option.disabled()
383     poppler_glib_dep = dependency('poppler-glib', version : req_version, required : get_option('pdf'))
384     if poppler_glib_dep.found()
385         conf_data.set('HAVE_PDF', 1)
386         summary({'pdf'  : ['pdf files supported:', true]}, section : 'Configuration', bool_yn : true)
387     else
388         summary({'pdf' : ['poppler-glib ' + req_version + ' not found - pdf files supported:', false]}, section : 'Configuration', bool_yn : true)
389     endif
390 else
391     summary({'pdf' : ['disabled - pdf files supported:', false]}, section : 'Configuration', bool_yn : true)
392 endif
393
394 gspell_dep = []
395 req_version = '>=1.6'
396 option = get_option('spell')
397 if not option.disabled()
398     gspell_dep = dependency('gspell-1', version : req_version, required: get_option('spell'))
399     if gspell_dep.found()
400         conf_data.set('HAVE_SPELL', 1)
401         summary({'spell' : ['spelling checks enabled', true]}, section : 'Configuration', bool_yn : true)
402     else
403         summary({'spell' : ['gspell-1 ' + req_version + ' not found - spelling checks not enabled', false]}, section : 'Configuration', bool_yn : true)
404     endif
405 else
406     summary({'spell' : ['disabled - spelling checks not enabled', false]}, section : 'Configuration', bool_yn : true)
407 endif
408
409 tiff_dep = []
410 option = get_option('tiff')
411 if not option.disabled()
412     tiff_dep = dependency('libtiff-4', required: get_option('tiff'))
413     if tiff_dep.found()
414         if cc.has_function('TIFFClientOpen', dependencies : tiff_dep)
415             conf_data.set('HAVE_TIFF', 1)
416             summary({'tiff' : ['tiff files supported:', true]}, section : 'Configuration', bool_yn : true)
417         else
418             summary({'tiff' : ['TIFFClientOpen not found - tiff files supported:', false]}, section : 'Configuration', bool_yn : true)
419         endif
420     else
421         summary({'tiff' : ['libtiff not found - tiff files supported:', false]}, section : 'Configuration', bool_yn : true)
422     endif
423 else
424     summary({'tiff' : ['disabled - tiff files supported:', false]}, section : 'Configuration', bool_yn : true)
425 endif
426
427 libwebp_dep = []
428 req_version = '>=0.6.1'
429 option = get_option('webp')
430 if not option.disabled()
431     libwebp_dep = dependency('libwebp', version : req_version, required : get_option('webp'))
432     if libwebp_dep.found()
433         conf_data.set('HAVE_WEBP', 1)
434         summary({'webp' : ['webp files supported:', true]}, section : 'Configuration', bool_yn : true)
435     else
436         summary({'webp' : ['libwebp ' + req_version + ' not found - webp files supported:', false]}, section : 'Configuration', bool_yn : true)
437     endif
438 else
439     summary({'webp' : ['disabled - webp files supported:', false]}, section : 'Configuration', bool_yn : true)
440 endif
441
442 # Check for nl_langinfo and _NL_TIME_FIRST_WEEKDAY
443 code = '''#include <langinfo.h>
444 #include<stdio.h>
445 int main (int argc, char ** argv) {
446     char *c;
447     c =  nl_langinfo(_NL_TIME_FIRST_WEEKDAY);
448     return 0;
449 }'''
450 if cc.links(code, name : 'nl_langinfo and _NL_TIME_FIRST_WEEKDAY')
451     conf_data.set('HAVE__NL_TIME_FIRST_WEEKDAY', 1)
452     summary({'nl_langinfo' : ['first weekday depends on locale:', true]}, section : 'Documentation', bool_yn : true)
453 else
454     summary({'nl_langinfo' : ['nl_langinfo not found - first weekday depends on locale:', false, 'first weekday defaults to Monday']}, section : 'Documentation', bool_yn : true)
455 endif
456
457 result = cc.has_function('strverscmp', prefix : '#include <string.h>')
458 if result
459     conf_data.set('HAVE_STRVERSCMP', 1)
460 endif
461
462 conf_data.set_quoted('GETTEXT_PACKAGE', meson.project_name())
463 conf_data.set_quoted('GQ_APPDIR', gq_appdir)
464 conf_data.set_quoted('GQ_BINDIR', gq_bindir)
465 conf_data.set_quoted('GQ_HELPDIR', gq_helpdir)
466 conf_data.set_quoted('GQ_HTMLDIR', gq_htmldir)
467 conf_data.set_quoted('GQ_LOCALEDIR', gq_localedir)
468
469 conf_data.set_quoted('PACKAGE', meson.project_name())
470 conf_data.set_quoted('PACKAGE_NAME', meson.project_name())
471 conf_data.set_quoted('PACKAGE_STRING', meson.project_version())
472 conf_data.set_quoted('PACKAGE_TARNAME', meson.project_name())
473 conf_data.set_quoted('PACKAGE_VERSION', meson.project_version())
474 conf_data.set_quoted('VERSION', meson.project_version())
475
476 configure_file(input : 'config.h.in',
477                output : 'config.h',
478                encoding : 'UTF-8',
479                configuration : conf_data)
480
481 # Process subdirs before the sources
482 subdir('po')
483 subdir('plugins')
484
485 # Generate the executable
486 subdir('src')
487
488 # Generate the help files
489 subdir('doc')
490
491 # Install other project files
492 res = run_command(find_program('gen_changelog.sh'), meson.source_root(), meson.build_root(), check : false)
493
494 if res.returncode() == 0
495     install_data(join_paths(meson.build_root(), 'ChangeLog'), join_paths(meson.build_root(), 'ChangeLog.html'), install_dir : helpdir)
496     summary({'ChangeLog' : ['ChangeLog, ChangeLog.html created:', true]}, section : 'Documentation', bool_yn : true)
497 else
498     summary({'ChangeLog' : ['ChangeLog, ChangeLog.html created:', false]}, section : 'Documentation', bool_yn : true)
499 endif
500
501 pandoc = find_program('pandoc', required : false)
502 if pandoc.found()
503     run_command(find_program('gen_readme.sh'), meson.source_root(), meson.build_root(), check : false)
504
505     install_data('README.md', 'COPYING', 'TODO', 'AUTHORS',
506                  join_paths(meson.build_root(), 'README.html'),
507                  install_dir : helpdir)
508     summary({'README' : ['README.html created:', true]}, section : 'Documentation', bool_yn : true)
509 else
510     install_data('README.md', 'COPYING', 'TODO', 'AUTHORS',
511                  install_dir : helpdir)
512     summary({'README' : ['pandoc not found - README.html created:', false]}, section : 'Documentation', bool_yn : true)
513 endif
514
515 evince = find_program('evince', required : false)
516 if evince.found()
517     summary({'print preview' : ['print preview supported:', true]}, section : 'Documentation', bool_yn : true)
518 else
519     summary({'print preview' : ['evince not found - print preview supported:', false]}, section : 'Documentation', bool_yn : true)
520 endif
521
522 install_data('geeqie.png', install_dir : icondir)
523 install_data('geeqie.1', install_dir : mandir1)
524
525 i18n.merge_file(
526     input : 'geeqie.desktop.in',
527     output : 'geeqie.desktop',
528     type : 'desktop',
529     po_dir : podir,
530     install : true,
531     install_dir : join_paths(datadir, 'applications'))
532
533 i18n.merge_file(
534     input : 'org.geeqie.Geeqie.appdata.xml.in',
535     output : 'org.geeqie.Geeqie.appdata.xml',
536     type : 'xml',
537     po_dir : podir,
538     install : true,
539     install_dir : appdatadir)
540
541 configure_file(input: 'geeqie.spec.in', output: 'geeqie.spec', configuration: conf_data)