summaryrefslogtreecommitdiff
path: root/kms++util
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2020-10-20 16:50:55 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2020-10-20 16:51:02 +0300
commit084ff3c55cce8bcba7099565b334fa4c88fd9df7 (patch)
tree6f4ea3fbdac3e72d5102099b37625ae4bc08d526 /kms++util
parentcda4a49a95c446be7738ab541008423690144761 (diff)
meson: fix build with thread support
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'kms++util')
-rw-r--r--kms++util/meson.build13
1 files changed, 11 insertions, 2 deletions
diff --git a/kms++util/meson.build b/kms++util/meson.build
index f9e76ae..4105db6 100644
--- a/kms++util/meson.build
+++ b/kms++util/meson.build
@@ -26,13 +26,22 @@ public_headers = [
private_includes = include_directories('src', 'inc')
public_includes = include_directories('inc')
-libkmsxxutil_deps = [ libkmsxx_dep, libfmt_dep ]
+thread_dep = dependency('threads', required : false)
+
+libkmsxxutil_args = [ ]
+
+if thread_dep.found()
+ libkmsxxutil_args += [ '-DHAS_PTHREAD' ]
+endif
+
+libkmsxxutil_deps = [ libkmsxx_dep, libfmt_dep, thread_dep ]
libkmsxxutil = library('kms++util',
libkmsxxutil_sources,
install : true,
include_directories : private_includes,
- dependencies : libkmsxxutil_deps)
+ dependencies : libkmsxxutil_deps,
+ cpp_args : libkmsxxutil_args)
libkmsxxutil_dep = declare_dependency(include_directories : public_includes,
link_with : libkmsxxutil)