summaryrefslogtreecommitdiffstats
path: root/bin/tools/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'bin/tools/meson.build')
-rw-r--r--bin/tools/meson.build23
1 files changed, 19 insertions, 4 deletions
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,