2021-07-14 07:09:19 +02:00
|
|
|
project('fastiv', 'c', default_options : ['c_std=gnu99'], version : '0.1.0')
|
|
|
|
|
2021-09-16 17:34:28 +02:00
|
|
|
# TODO(p): Use libraw_r later, when we start parallelizing/preloading.
|
2021-09-16 12:35:36 +02:00
|
|
|
libraw = dependency('libraw', required : get_option('libraw'))
|
2021-11-09 19:42:43 +01:00
|
|
|
librsvg = dependency('librsvg-2.0', required : get_option('librsvg'))
|
2021-11-10 21:33:30 +01:00
|
|
|
gdkpixbuf = dependency('gdk-pixbuf-2.0', required : get_option('gdk-pixbuf'))
|
2021-09-16 12:35:36 +02:00
|
|
|
dependencies = [
|
|
|
|
dependency('gtk+-3.0'),
|
|
|
|
dependency('libturbojpeg'),
|
2021-09-26 07:37:13 +02:00
|
|
|
dependency('libpng', version : '>=1.5.4'),
|
2021-11-03 12:05:43 +01:00
|
|
|
dependency('pixman-1'),
|
2021-09-16 12:35:36 +02:00
|
|
|
libraw,
|
2021-11-09 19:42:43 +01:00
|
|
|
librsvg,
|
2021-09-17 20:40:11 +02:00
|
|
|
meson.get_compiler('c').find_library('m', required : false),
|
2021-09-16 12:35:36 +02:00
|
|
|
]
|
|
|
|
|
2021-07-14 07:09:19 +02:00
|
|
|
conf = configuration_data()
|
|
|
|
conf.set_quoted('PROJECT_NAME', meson.project_name())
|
|
|
|
conf.set_quoted('PROJECT_VERSION', meson.project_version())
|
2021-09-16 12:35:36 +02:00
|
|
|
conf.set('HAVE_LIBRAW', libraw.found())
|
2021-11-09 19:42:43 +01:00
|
|
|
conf.set('HAVE_LIBRSVG', librsvg.found())
|
2021-11-10 21:33:30 +01:00
|
|
|
conf.set('HAVE_GDKPIXBUF', gdkpixbuf.found())
|
2021-07-14 07:09:19 +02:00
|
|
|
configure_file(
|
|
|
|
output : 'config.h',
|
|
|
|
configuration : conf,
|
|
|
|
)
|
|
|
|
|
2021-09-20 00:30:20 +02:00
|
|
|
executable('fastiv', 'fastiv.c', 'fastiv-view.c', 'fastiv-io.c',
|
2021-11-01 05:08:55 +01:00
|
|
|
'fastiv-browser.c', 'xdg.c',
|
2021-07-14 07:09:19 +02:00
|
|
|
install : true,
|
|
|
|
dependencies : [dependencies])
|
2021-09-16 17:34:28 +02:00
|
|
|
|
2021-09-20 01:43:25 +02:00
|
|
|
# TODO(p): See fastiv_io_open(), consider optionally integrating this.
|
|
|
|
gdk_pixbuf = dependency('gdk-pixbuf-2.0', required : false)
|
|
|
|
if gdk_pixbuf.found()
|
2021-11-08 17:25:38 +01:00
|
|
|
executable('io-benchmark', 'fastiv-io-benchmark.c', 'fastiv-io.c', 'xdg.c',
|
2021-09-20 01:43:25 +02:00
|
|
|
build_by_default : false,
|
|
|
|
dependencies : [dependencies, gdk_pixbuf])
|
|
|
|
endif
|
|
|
|
|
2021-09-16 17:34:28 +02:00
|
|
|
install_data('fastiv.desktop',
|
|
|
|
install_dir : get_option('datadir') + '/applications')
|
|
|
|
install_data('fastiv.svg',
|
|
|
|
install_dir : get_option('datadir') + '/icons/hicolor/scalable/apps')
|