mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
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:
parent
19bcdaebe2
commit
7ab5c35cad
3 changed files with 12 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
project('pipewire', ['c' ],
|
project('pipewire', ['c' ],
|
||||||
version : '0.3.30',
|
version : '0.3.30',
|
||||||
license : [ 'MIT', 'LGPL-2.1-or-later', 'GPL-2.0-only' ],
|
license : [ 'MIT', 'LGPL-2.1-or-later', 'GPL-2.0-only' ],
|
||||||
meson_version : '>= 0.49.0',
|
meson_version : '>= 0.54.0',
|
||||||
default_options : [ 'warning_level=3',
|
default_options : [ 'warning_level=3',
|
||||||
'c_std=gnu99',
|
'c_std=gnu99',
|
||||||
'b_pie=true',
|
'b_pie=true',
|
||||||
|
|
|
||||||
|
|
@ -44,9 +44,16 @@ if not get_option('examples').disabled()
|
||||||
subdir('examples')
|
subdir('examples')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
spa_dep = declare_dependency(
|
||||||
|
include_directories : [spa_inc],
|
||||||
|
version : spaversion,
|
||||||
|
)
|
||||||
|
|
||||||
pkgconfig.generate(filebase : 'lib@0@'.format(spa_name),
|
pkgconfig.generate(filebase : 'lib@0@'.format(spa_name),
|
||||||
name : 'libspa',
|
name : 'libspa',
|
||||||
subdirs : spa_name,
|
subdirs : spa_name,
|
||||||
description : 'Simple Plugin API',
|
description : 'Simple Plugin API',
|
||||||
version : spaversion,
|
version : spaversion,
|
||||||
extra_cflags : '-D_REENTRANT')
|
extra_cflags : '-D_REENTRANT')
|
||||||
|
|
||||||
|
meson.override_dependency('lib@0@'.format(spa_name), spa_dep)
|
||||||
|
|
|
||||||
|
|
@ -107,8 +107,8 @@ libpipewire = shared_library(pipewire_name, pipewire_sources,
|
||||||
)
|
)
|
||||||
|
|
||||||
pipewire_dep = declare_dependency(link_with : libpipewire,
|
pipewire_dep = declare_dependency(link_with : libpipewire,
|
||||||
include_directories : [pipewire_inc, configinc, spa_inc],
|
include_directories : [pipewire_inc, configinc],
|
||||||
dependencies : [pthread_lib, atomic_dep, ],
|
dependencies : [pthread_lib, atomic_dep, spa_dep],
|
||||||
)
|
)
|
||||||
|
|
||||||
pkgconfig.generate(libpipewire,
|
pkgconfig.generate(libpipewire,
|
||||||
|
|
@ -121,4 +121,6 @@ pkgconfig.generate(libpipewire,
|
||||||
extra_cflags : '-D_REENTRANT',
|
extra_cflags : '-D_REENTRANT',
|
||||||
variables : ['moduledir=${libdir}/@0@'.format(pipewire_name)])
|
variables : ['moduledir=${libdir}/@0@'.format(pipewire_name)])
|
||||||
|
|
||||||
|
meson.override_dependency('lib@0@'.format(pipewire_name), pipewire_dep)
|
||||||
|
|
||||||
subdir('extensions')
|
subdir('extensions')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue