From f9ed9178149fb79bcdc20e454962b27a44044f79 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 24 Jan 2018 11:55:28 +0000 Subject: [PATCH] build: Do not redefine dependency objects Use the top-level ones. --- spa/meson.build | 9 ++++----- spa/plugins/audiotestsrc/meson.build | 2 +- spa/tests/meson.build | 6 +++--- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/spa/meson.build b/spa/meson.build index 680898d06..74e92d2ba 100644 --- a/spa/meson.build +++ b/spa/meson.build @@ -12,11 +12,10 @@ sbc_dep = dependency('sbc', required : false) libudev_dep = dependency('libudev') threads_dep = dependency('threads') -cc = meson.get_compiler('c') - -dl_lib = cc.find_library('dl', required : true) -pthread_lib = cc.find_library('pthread', required : true) -libm = cc.find_library('m', required : true) +#cc = meson.get_compiler('c') +#dl_lib = cc.find_library('dl', required : false) +#pthread_lib = dependencies('threads') +#mathlib = cc.find_library('m', required : false) spa_inc = include_directories('include') spa_libinc = include_directories('.') diff --git a/spa/plugins/audiotestsrc/meson.build b/spa/plugins/audiotestsrc/meson.build index 9886b0cb8..b68da31d6 100644 --- a/spa/plugins/audiotestsrc/meson.build +++ b/spa/plugins/audiotestsrc/meson.build @@ -3,7 +3,7 @@ audiotestsrc_sources = ['audiotestsrc.c', 'plugin.c'] audiotestsrclib = shared_library('spa-audiotestsrc', audiotestsrc_sources, include_directories : [spa_inc, spa_libinc], - dependencies : libm, + dependencies : mathlib, link_with : spalib, install : true, install_dir : '@0@/spa/audiotestsrc'.format(get_option('libdir'))) diff --git a/spa/tests/meson.build b/spa/tests/meson.build index f168d02cd..d03820033 100644 --- a/spa/tests/meson.build +++ b/spa/tests/meson.build @@ -1,11 +1,11 @@ executable('test-mixer', 'test-mixer.c', include_directories : [spa_inc ], - dependencies : [dl_lib, pthread_lib, libm], + dependencies : [dl_lib, pthread_lib, mathlib], link_with : spalib, install : false) executable('test-bluez5', 'test-bluez5.c', include_directories : [spa_inc, spa_libinc ], - dependencies : [dl_lib, pthread_lib, libm, dbus_dep], + dependencies : [dl_lib, pthread_lib, mathlib, dbus_dep], link_with : spalib, install : false) executable('test-ringbuffer', 'test-ringbuffer.c', @@ -62,6 +62,6 @@ executable('test-props5', 'test-props5.c', install : false) executable('test-control', 'test-control.c', include_directories : [spa_inc, spa_libinc ], - dependencies : [dl_lib, pthread_lib, libm], + dependencies : [dl_lib, pthread_lib, mathlib], link_with : spalib, install : false)