meson: declare spa_dep and override_dependency() for spa and pipewire

This allows meson subprojects (or projects using pipewire as a meson
subproject) to be able to use dependency('libpipewire-0.3') and
dependency('libspa-0.2') to find the uninstalled versions of these
libraries directly from the build dir instead of going through pkg-config
This commit is contained in:
George Kiagiadakis 2021-06-16 18:25:34 +03:00
parent 19bcdaebe2
commit 7ab5c35cad
3 changed files with 12 additions and 3 deletions

View file

@ -44,9 +44,16 @@ if not get_option('examples').disabled()
subdir('examples')
endif
spa_dep = declare_dependency(
include_directories : [spa_inc],
version : spaversion,
)
pkgconfig.generate(filebase : 'lib@0@'.format(spa_name),
name : 'libspa',
subdirs : spa_name,
description : 'Simple Plugin API',
version : spaversion,
extra_cflags : '-D_REENTRANT')
meson.override_dependency('lib@0@'.format(spa_name), spa_dep)