summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2017-10-11 10:43:18 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2017-10-11 10:43:18 +0200
commitc208620943239c5cdbe80c562bd5366ff4ffaab9 (patch)
treef6196ecdf75f0a764bdfcce3966cab00b0cbd239
parentc437fcf96e480babe1566f5b0e686e9c915627c6 (diff)
downloaduca-c208620943239c5cdbe80c562bd5366ff4ffaab9.tar.gz
uca-c208620943239c5cdbe80c562bd5366ff4ffaab9.tar.bz2
uca-c208620943239c5cdbe80c562bd5366ff4ffaab9.tar.xz
uca-c208620943239c5cdbe80c562bd5366ff4ffaab9.zip
grab: allow TIFF support with meson
-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,