aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2018-05-17 23:05:54 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2018-05-17 23:05:54 +0200
commit8da759794da6eded891114789ee5a8046f689549 (patch)
tree3c649c9aa618ad5358e65898e07446817676e32c
parente442142407bf13ff49145e82642df49de8a19248 (diff)
downloadvarchunk-8da759794da6eded891114789ee5a8046f689549.tar.xz
meson: conditionally link test against librt.
-rw-r--r--meson.build9
1 files changed, 7 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index a395b3e..7cfb85d 100644
--- a/meson.build
+++ b/meson.build
@@ -12,12 +12,17 @@ add_project_arguments('-D_GNU_SOURCE', language : 'c')
conf_data = configuration_data()
cc = meson.get_compiler('c')
-rt_dep = cc.find_library('rt')
thread_dep = dependency('threads')
+deps = [thread_dep]
+
+if host_machine.system() == 'linux'
+ rt_dep = cc.find_library('rt')
+ deps += rt_dep
+endif
test_varchunk = executable('test_varchunk',
'test_varchunk.c',
- dependencies : [rt_dep, thread_dep],
+ dependencies : deps,
install : false)
test('Test', test_varchunk,