mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2026-03-28 07:58:31 -04:00
build-sys: use pkgconfig generator module to ensure right dependencies
This commit is contained in:
parent
baf1315e09
commit
4315036e39
4 changed files with 30 additions and 60 deletions
|
|
@ -1,12 +0,0 @@
|
||||||
prefix=@prefix@
|
|
||||||
exec_prefix=@exec_prefix@
|
|
||||||
libdir=@libdir@
|
|
||||||
includedir=@includedir@
|
|
||||||
|
|
||||||
Name: libpulse-mainloop-glib
|
|
||||||
Description: PulseAudio GLib 2.0 Main Loop Wrapper
|
|
||||||
Version: @PACKAGE_VERSION@
|
|
||||||
Libs: -L${libdir} -lpulse-mainloop-glib @PTHREAD_LIBS@
|
|
||||||
Libs.private: -L${libdir}/pulseaudio -lpulsecommon-@PA_MAJORMINOR@
|
|
||||||
Cflags: -I${includedir} -D_REENTRANT
|
|
||||||
Requires: libpulse glib-2.0
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
prefix=@prefix@
|
|
||||||
exec_prefix=@exec_prefix@
|
|
||||||
libdir=@libdir@
|
|
||||||
includedir=@includedir@
|
|
||||||
|
|
||||||
Name: libpulse-simple
|
|
||||||
Description: PulseAudio Simplified Synchronous Client Interface
|
|
||||||
Version: @PACKAGE_VERSION@
|
|
||||||
Libs: -L${libdir} -lpulse-simple @PTHREAD_LIBS@
|
|
||||||
Libs.private: -L${libdir}/pulseaudio -lpulsecommon-@PA_MAJORMINOR@
|
|
||||||
Cflags: -I${includedir} -D_REENTRANT
|
|
||||||
Requires: libpulse
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
prefix=@prefix@
|
|
||||||
exec_prefix=@exec_prefix@
|
|
||||||
libdir=@libdir@
|
|
||||||
includedir=@includedir@
|
|
||||||
modlibexecdir=@modlibexecdir@
|
|
||||||
|
|
||||||
Name: libpulse
|
|
||||||
Description: PulseAudio Client Interface
|
|
||||||
Version: @PACKAGE_VERSION@
|
|
||||||
Libs: -L${libdir} -lpulse @PTHREAD_LIBS@
|
|
||||||
Libs.private: -L${libdir}/pulseaudio -lpulsecommon-@PA_MAJORMINOR@
|
|
||||||
Cflags: -I${includedir} -D_REENTRANT
|
|
||||||
54
meson.build
54
meson.build
|
|
@ -862,38 +862,44 @@ if get_option('client')
|
||||||
|
|
||||||
# pkg-config files
|
# pkg-config files
|
||||||
|
|
||||||
pc_cdata = configuration_data()
|
|
||||||
|
|
||||||
pc_cdata.set('prefix', prefix)
|
|
||||||
pc_cdata.set('exec_prefix', prefix)
|
|
||||||
pc_cdata.set('libdir', libdir)
|
|
||||||
pc_cdata.set('includedir', includedir)
|
|
||||||
pc_cdata.set('modlibexecdir', modlibexecdir)
|
|
||||||
pc_cdata.set('PACKAGE_VERSION', pa_version_str)
|
|
||||||
pc_cdata.set('PA_MAJORMINOR', pa_version_major_minor)
|
|
||||||
# FIXME: the line below is wrong. Currently the meson thread dep lacks documentation,
|
# FIXME: the line below is wrong. Currently the meson thread dep lacks documentation,
|
||||||
# and doesn't allow introspection, ie. none of get_pkgconfig_variable() or
|
# and doesn't allow introspection, ie. none of get_pkgconfig_variable() or
|
||||||
# get_configtool_variable() work with it, so we have no way to get this flag right,
|
# get_configtool_variable() work with it, so we have no way to get this flag right,
|
||||||
# unless we do all the work ourselves. See current work in glib, also meson #553.
|
# unless we do all the work ourselves. See current work in glib, also meson #553.
|
||||||
pc_cdata.set('PTHREAD_LIBS', '-pthread')
|
extra_libs = ['-pthread']
|
||||||
|
extra_cflags = ['-D_REENTRANT']
|
||||||
pc_files = [
|
|
||||||
'libpulse.pc',
|
|
||||||
'libpulse-simple.pc',
|
|
||||||
]
|
|
||||||
|
|
||||||
|
pkg = import('pkgconfig')
|
||||||
|
pkg.generate(libpulse,
|
||||||
|
name : 'libpulse',
|
||||||
|
description : 'PulseAudio Client Interface',
|
||||||
|
version : pa_version_str,
|
||||||
|
install_dir : pkgconfigdir,
|
||||||
|
libraries : extra_libs,
|
||||||
|
extra_cflags : extra_cflags,
|
||||||
|
variables : [
|
||||||
|
'modlibexecdir=@0@'.format(modlibexecdir)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
pkg.generate(libpulse_simple,
|
||||||
|
name : 'libpulse-simple',
|
||||||
|
description : 'PulseAudio Simplified Synchronous Client Interface',
|
||||||
|
version : pa_version_str,
|
||||||
|
install_dir : pkgconfigdir,
|
||||||
|
libraries : extra_libs,
|
||||||
|
extra_cflags : extra_cflags,
|
||||||
|
)
|
||||||
if glib_dep.found()
|
if glib_dep.found()
|
||||||
pc_files += 'libpulse-mainloop-glib.pc'
|
pkg.generate(libpulse_mainloop_glib,
|
||||||
|
name : 'libpulse-mainloop-glib',
|
||||||
|
description : 'PulseAudio GLib 2.0 Main Loop Wrapper',
|
||||||
|
version : pa_version_str,
|
||||||
|
install_dir : pkgconfigdir,
|
||||||
|
libraries : extra_libs,
|
||||||
|
extra_cflags : extra_cflags,
|
||||||
|
)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
foreach file : pc_files
|
|
||||||
configure_file(
|
|
||||||
input : file + '.in',
|
|
||||||
output : file,
|
|
||||||
configuration : pc_cdata,
|
|
||||||
install_dir : pkgconfigdir)
|
|
||||||
endforeach
|
|
||||||
|
|
||||||
# CMake files
|
# CMake files
|
||||||
|
|
||||||
m4 = find_program('m4', required: true)
|
m4 = find_program('m4', required: true)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue