build: Do not redefine dependency objects

Use the top-level ones.
This commit is contained in:
Emmanuele Bassi 2018-01-24 11:55:28 +00:00 committed by Wim Taymans
parent a52ba92378
commit f9ed917814
3 changed files with 8 additions and 9 deletions

View file

@ -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('.')

View file

@ -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')))

View file

@ -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)