From c208620943239c5cdbe80c562bd5366ff4ffaab9 Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Wed, 11 Oct 2017 10:43:18 +0200 Subject: grab: allow TIFF support with meson --- bin/tools/meson.build | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'bin/tools/meson.build') diff --git a/bin/tools/meson.build b/bin/tools/meson.build index 6901939..b44aa44 100644 --- a/bin/tools/meson.build +++ b/bin/tools/meson.build @@ -1,7 +1,22 @@ cc = meson.get_compiler('c') libm = cc.find_library('m') -executable('uca-info', +tiff_dep = dependency('libtiff-4', required: false) + +config = configuration_data() +config.set('HAVE_LIBTIFF', tiff_dep.found()) +configure_file( + output: 'config.h', + configuration: config +) + +grab_deps = deps + [libm] + +if tiff_dep.found() + grab_deps += tiff_dep +endif + +executable('uca-info', sources: ['info.c'], include_directories: include_dir, dependencies: deps, @@ -9,15 +24,15 @@ executable('uca-info', install: true ) -executable('uca-grab', +executable('uca-grab', sources: ['grab.c', 'common.c'], include_directories: include_dir, - dependencies: deps + [libm], + dependencies: grab_deps, link_with: lib, install: true ) -executable('uca-benchmark', +executable('uca-benchmark', sources: ['benchmark.c', 'common.c'], include_directories: include_dir, dependencies: deps, -- cgit v1.2.3