mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
meson: Use pkgconfig.generate
Also fixes the moduledir having a duplicated prefix.
This commit is contained in:
parent
692d96b9a4
commit
bbba49aae1
6 changed files with 18 additions and 46 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
project('pipewire', 'c',
|
project('pipewire', 'c',
|
||||||
version : '0.2.3',
|
version : '0.2.3',
|
||||||
meson_version : '>= 0.36.0',
|
meson_version : '>= 0.42.0',
|
||||||
default_options : [ 'warning_level=1',
|
default_options : [ 'warning_level=1',
|
||||||
'c_std=gnu99',
|
'c_std=gnu99',
|
||||||
'buildtype=debugoptimized' ])
|
'buildtype=debugoptimized' ])
|
||||||
|
|
@ -34,6 +34,7 @@ modules_install_dir = join_paths(pipewire_libdir, 'pipewire-@0@'.format(apiversi
|
||||||
spa_plugindir = join_paths(pipewire_libdir, 'spa')
|
spa_plugindir = join_paths(pipewire_libdir, 'spa')
|
||||||
|
|
||||||
gnome = import('gnome')
|
gnome = import('gnome')
|
||||||
|
pkgconfig = import('pkgconfig')
|
||||||
|
|
||||||
cc = meson.get_compiler('c')
|
cc = meson.get_compiler('c')
|
||||||
|
|
||||||
|
|
@ -164,7 +165,6 @@ endif
|
||||||
|
|
||||||
subdir('spa')
|
subdir('spa')
|
||||||
subdir('src')
|
subdir('src')
|
||||||
subdir('pkgconfig')
|
|
||||||
|
|
||||||
if get_option('docs')
|
if get_option('docs')
|
||||||
doxygen = find_program('doxygen', required : false)
|
doxygen = find_program('doxygen', required : false)
|
||||||
|
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
prefix=@prefix@
|
|
||||||
exec_prefix=@exec_prefix@
|
|
||||||
libdir=@libdir@
|
|
||||||
includedir=@includedir@/
|
|
||||||
moduledir=@moduledir@
|
|
||||||
|
|
||||||
Name: libpipewire
|
|
||||||
Description: PipeWire Interface
|
|
||||||
Version: @VERSION@
|
|
||||||
Libs: -L${libdir} -lpipewire-@PIPEWIRE_API_VERSION@
|
|
||||||
Cflags: -I${includedir} -D_REENTRANT
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
prefix=@prefix@
|
|
||||||
includedir=@includedir@/
|
|
||||||
|
|
||||||
Name: libspa
|
|
||||||
Description: Simple Plugin API
|
|
||||||
Version: @VERSION@
|
|
||||||
Cflags: -I${includedir} -D_REENTRANT
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
pkgconf = configuration_data()
|
|
||||||
|
|
||||||
pkgconf.set('prefix', get_option('prefix'))
|
|
||||||
pkgconf.set('exec_prefix', '${prefix}')
|
|
||||||
pkgconf.set('libdir', '${prefix}/@0@'.format(get_option('libdir')))
|
|
||||||
pkgconf.set('includedir', '${prefix}/@0@'.format(get_option('includedir')))
|
|
||||||
pkgconf.set('moduledir', '${prefix}/@0@'.format(modules_install_dir))
|
|
||||||
pkgconf.set('PIPEWIRE_API_VERSION', apiversion)
|
|
||||||
pkgconf.set('VERSION', pipewire_version)
|
|
||||||
|
|
||||||
pkg_install_dir = '@0@/pkgconfig'.format(get_option('libdir'))
|
|
||||||
|
|
||||||
pkg_files = [
|
|
||||||
[ 'libpipewire', apiversion ],
|
|
||||||
[ 'libspa', spaversion ],
|
|
||||||
]
|
|
||||||
|
|
||||||
foreach p : pkg_files
|
|
||||||
infile = p.get(0) + '.pc.in'
|
|
||||||
outfile = p.get(0) + '-@0@.pc'.format(p.get(1))
|
|
||||||
configure_file(input : infile,
|
|
||||||
output : outfile,
|
|
||||||
configuration : pkgconf,
|
|
||||||
install_dir : pkg_install_dir)
|
|
||||||
endforeach
|
|
||||||
|
|
@ -24,3 +24,9 @@ subdir('include')
|
||||||
subdir('plugins')
|
subdir('plugins')
|
||||||
subdir('tools')
|
subdir('tools')
|
||||||
subdir('tests')
|
subdir('tests')
|
||||||
|
|
||||||
|
pkgconfig.generate(filebase : 'libspa-@0@'.format(spaversion),
|
||||||
|
name : 'libspa',
|
||||||
|
description : 'Simple Plugin API',
|
||||||
|
version : pipewire_version,
|
||||||
|
extra_cflags : '-D_REENTRANT')
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,8 @@ libpipewire_c_args = [
|
||||||
'-D_POSIX_C_SOURCE',
|
'-D_POSIX_C_SOURCE',
|
||||||
]
|
]
|
||||||
|
|
||||||
libpipewire = shared_library('pipewire-@0@'.format(apiversion), pipewire_sources,
|
libpipewire_name = 'pipewire-@0@'.format(apiversion)
|
||||||
|
libpipewire = shared_library(libpipewire_name, pipewire_sources,
|
||||||
version : libversion,
|
version : libversion,
|
||||||
soversion : soversion,
|
soversion : soversion,
|
||||||
c_args : libpipewire_c_args,
|
c_args : libpipewire_c_args,
|
||||||
|
|
@ -87,3 +88,11 @@ pipewire_dep = declare_dependency(link_with : libpipewire,
|
||||||
include_directories : [pipewire_inc, configinc, spa_inc],
|
include_directories : [pipewire_inc, configinc, spa_inc],
|
||||||
dependencies : [pthread_lib],
|
dependencies : [pthread_lib],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
pkgconfig.generate(filebase : 'lib@0@'.format(libpipewire_name),
|
||||||
|
libraries : [libpipewire],
|
||||||
|
name : 'libpipewire',
|
||||||
|
description : 'PipeWire Interface',
|
||||||
|
version : pipewire_version,
|
||||||
|
extra_cflags : '-D_REENTRANT',
|
||||||
|
variables : ['moduledir=${libdir}/@0@'.format(libpipewire_name)])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue