meson: Install pkg-config files

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
This commit is contained in:
Arnaud Rebillout 2018-11-19 08:48:35 +00:00 committed by Arun Raghavan
parent 3a91cb1c29
commit cd1418222b
3 changed files with 41 additions and 1 deletions

View file

@ -42,6 +42,7 @@ prefix = get_option('prefix')
assert(prefix.startswith('/'), 'Prefix is not absolute: "@0@"'.format(prefix))
bindir = join_paths(prefix, get_option('bindir'))
includedir = join_paths(prefix, get_option('includedir'))
libdir = join_paths(prefix, get_option('libdir'))
libexecdir = join_paths(prefix, get_option('libexecdir'))
mandir = join_paths(prefix, get_option('mandir'))
@ -51,6 +52,7 @@ sysconfdir = join_paths(prefix, get_option('sysconfdir'))
privlibdir = join_paths(get_option('libdir'), 'pulseaudio')
alsadatadir = join_paths(datadir, 'pulseaudio', 'alsa-mixer')
pkgconfigdir = join_paths(libdir, 'pkgconfig')
pulselibexecdir = join_paths(libexecdir, 'pulse')
pulsesysconfdir = join_paths(sysconfdir, 'pulse')
@ -437,6 +439,42 @@ check_dep = dependency('check', version : '>= 0.9.10', required : get_option('te
# Now generate config.h from everything above
configure_file(output : 'config.h', configuration : cdata)
# 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,
# 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,
# unless we do all the work ourselves. See current work in glib, also meson #553.
pc_cdata.set('PTHREAD_LIBS', '-pthread')
pc_files = [
'libpulse.pc',
'libpulse-simple.pc',
]
if glib_dep.found()
pc_files += 'libpulse-mainloop-glib.pc'
endif
foreach file : pc_files
configure_file(
input : file + '.in',
output : file,
configuration : pc_cdata,
install_dir : pkgconfigdir)
endforeach
# Subdirs
if get_option('man')
subdir('man')
endif

View file

@ -21,6 +21,9 @@ option('database',
option('legacy-database-entry-format',
type : 'boolean',
description : 'Try to load legacy (< 1.0) database files (card, device and volume restore)')
# Paths
option('pulsedspdir',
type : 'string',
description : 'Specify location where OSS wrapper will be installed')

View file

@ -91,7 +91,6 @@ libpulse_simple = shared_library('pulse-simple',
libpulse_simple_dep = declare_dependency(link_with: libpulse_simple)
if glib_dep.found()
# TODO we must install libpulse-mainloop-glib.pc
libpulse_mainloop_glib = shared_library('pulse-mainloop-glib',
'glib-mainloop.c',
'glib-mainloop.h',