summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)