mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
build-sys: meson: Allow building the daemon only
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/659>
This commit is contained in:
parent
a67f894775
commit
4cf4a1fd5b
10 changed files with 54 additions and 16 deletions
|
|
@ -14,6 +14,7 @@ if get_option('daemon')
|
||||||
]
|
]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if not get_option('daemon-only')
|
||||||
manpages += [
|
manpages += [
|
||||||
['pacat', '1', ['paplay', 'parec', 'parecord', 'pamon']],
|
['pacat', '1', ['paplay', 'parec', 'parecord', 'pamon']],
|
||||||
['pactl', '1'],
|
['pactl', '1'],
|
||||||
|
|
@ -31,6 +32,7 @@ if x11_dep.found()
|
||||||
['pax11publish', '1'],
|
['pax11publish', '1'],
|
||||||
]
|
]
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
# FIXME: Add esdcompat if HAVE_ESOUND
|
# FIXME: Add esdcompat if HAVE_ESOUND
|
||||||
#manpages += ['esdcompat', '1'],
|
#manpages += ['esdcompat', '1'],
|
||||||
|
|
|
||||||
23
meson.build
23
meson.build
|
|
@ -53,6 +53,8 @@ libpulse_mainloop_glib_version = '@0@.@1@.@2@'.format(
|
||||||
libpulse_mainloop_glib_version_info[1],
|
libpulse_mainloop_glib_version_info[1],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
i18n = import('i18n')
|
||||||
|
|
||||||
# Paths
|
# Paths
|
||||||
|
|
||||||
prefix = get_option('prefix')
|
prefix = get_option('prefix')
|
||||||
|
|
@ -68,6 +70,7 @@ localedir = join_paths(prefix, get_option('localedir'))
|
||||||
localstatedir = join_paths(prefix, get_option('localstatedir'))
|
localstatedir = join_paths(prefix, get_option('localstatedir'))
|
||||||
sysconfdir = join_paths(prefix, get_option('sysconfdir'))
|
sysconfdir = join_paths(prefix, get_option('sysconfdir'))
|
||||||
privlibdir = join_paths(libdir, 'pulseaudio')
|
privlibdir = join_paths(libdir, 'pulseaudio')
|
||||||
|
po_dir = join_paths(meson.current_source_dir(), 'po')
|
||||||
|
|
||||||
if host_machine.system() == 'windows'
|
if host_machine.system() == 'windows'
|
||||||
# Windows only supports loading libraries from the same dir as the executable
|
# Windows only supports loading libraries from the same dir as the executable
|
||||||
|
|
@ -817,20 +820,28 @@ check_dep = dependency('check', version : '>= 0.9.10', required : get_option('te
|
||||||
if get_option('doxygen')
|
if get_option('doxygen')
|
||||||
subdir('doxygen')
|
subdir('doxygen')
|
||||||
endif
|
endif
|
||||||
subdir('po')
|
if not get_option('daemon-only')
|
||||||
|
subdir('po')
|
||||||
|
endif
|
||||||
if get_option('man')
|
if get_option('man')
|
||||||
subdir('man')
|
subdir('man')
|
||||||
endif
|
endif
|
||||||
subdir('shell-completion/bash')
|
subdir('shell-completion/bash')
|
||||||
subdir('shell-completion/zsh')
|
if not get_option('daemon-only')
|
||||||
|
subdir('shell-completion/zsh')
|
||||||
|
endif
|
||||||
subdir('src')
|
subdir('src')
|
||||||
subdir('vala')
|
if not get_option('daemon-only')
|
||||||
|
subdir('vala')
|
||||||
|
endif
|
||||||
|
|
||||||
# Now generate config.h from everything above
|
# Now generate config.h from everything above
|
||||||
configure_file(output : 'config.h', configuration : cdata)
|
configure_file(output : 'config.h', configuration : cdata)
|
||||||
|
|
||||||
# pkg-config files
|
# pkg-config files
|
||||||
|
|
||||||
|
if not get_option('daemon-only')
|
||||||
|
|
||||||
pc_cdata = configuration_data()
|
pc_cdata = configuration_data()
|
||||||
|
|
||||||
pc_cdata.set('prefix', prefix)
|
pc_cdata.set('prefix', prefix)
|
||||||
|
|
@ -863,8 +874,12 @@ foreach file : pc_files
|
||||||
install_dir : pkgconfigdir)
|
install_dir : pkgconfigdir)
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
|
endif # !daemon-only
|
||||||
|
|
||||||
# CMake files
|
# CMake files
|
||||||
|
|
||||||
|
if not get_option('daemon-only')
|
||||||
|
|
||||||
m4 = find_program('m4', required: true)
|
m4 = find_program('m4', required: true)
|
||||||
|
|
||||||
cmakedir = join_paths(libdir, 'cmake', 'PulseAudio')
|
cmakedir = join_paths(libdir, 'cmake', 'PulseAudio')
|
||||||
|
|
@ -893,6 +908,8 @@ configure_file(
|
||||||
install_dir : cmakedir,
|
install_dir : cmakedir,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
endif # !daemon-only
|
||||||
|
|
||||||
############################################################
|
############################################################
|
||||||
|
|
||||||
# Final summary
|
# Final summary
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
option('daemon',
|
option('daemon',
|
||||||
type : 'boolean', value : true,
|
type : 'boolean', value : true,
|
||||||
description : 'Enable building and installation of pulseaudio daemon and supporting configuration files')
|
description : 'Enable building and installation of pulseaudio daemon and supporting configuration files')
|
||||||
|
option('daemon-only',
|
||||||
|
type : 'boolean', value : false,
|
||||||
|
description : 'Build and install only the pulseaudio daemon and supporting configuration files, relying on a system installation of libpulse')
|
||||||
option('doxygen',
|
option('doxygen',
|
||||||
type : 'boolean', value : true,
|
type : 'boolean', value : true,
|
||||||
description : 'Enable building and installation of documentation generated with doxygen')
|
description : 'Enable building and installation of documentation generated with doxygen')
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
i18n = import('i18n')
|
|
||||||
i18n.gettext(
|
i18n.gettext(
|
||||||
meson.project_name(),
|
meson.project_name(),
|
||||||
preset: 'glib',
|
preset: 'glib',
|
||||||
|
|
@ -7,5 +6,3 @@ i18n.gettext(
|
||||||
args: ['--msgid-bugs-address=https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/new',
|
args: ['--msgid-bugs-address=https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/new',
|
||||||
'--width=90'],
|
'--width=90'],
|
||||||
)
|
)
|
||||||
|
|
||||||
po_dir = meson.current_source_dir()
|
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ if bashcompletiondir != 'no'
|
||||||
]
|
]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if not get_option('daemon-only')
|
||||||
aliases += [
|
aliases += [
|
||||||
'pacat',
|
'pacat',
|
||||||
'pactl',
|
'pactl',
|
||||||
|
|
@ -16,6 +17,7 @@ if bashcompletiondir != 'no'
|
||||||
'parec',
|
'parec',
|
||||||
'parecord',
|
'parecord',
|
||||||
]
|
]
|
||||||
|
endif
|
||||||
|
|
||||||
install_data('pulseaudio', install_dir : bashcompletiondir)
|
install_data('pulseaudio', install_dir : bashcompletiondir)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,8 +30,8 @@ executable('pulseaudio',
|
||||||
install_rpath : privlibdir,
|
install_rpath : privlibdir,
|
||||||
include_directories : [configinc, topinc],
|
include_directories : [configinc, topinc],
|
||||||
link_args : ['-ffast-math'],
|
link_args : ['-ffast-math'],
|
||||||
link_with : [libpulsecore, libpulsecommon, libpulse],
|
link_with : [libpulsecore],
|
||||||
dependencies : [ltdl_dep, cap_dep, dbus_dep, libsystemd_dep, dl_dep, libintl_dep, platform_dep, platform_socket_dep],
|
dependencies : [ltdl_dep, cap_dep, dbus_dep, libsystemd_dep, dl_dep, libintl_dep, platform_dep, platform_socket_dep, libpulsecommon_dep, libpulse_dep],
|
||||||
c_args : pa_c_args,
|
c_args : pa_c_args,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -188,6 +188,15 @@ else
|
||||||
endif
|
endif
|
||||||
# FIXME: Do SIMD things
|
# FIXME: Do SIMD things
|
||||||
|
|
||||||
|
if get_option('daemon-only')
|
||||||
|
libpulsecommon_dep = cc.find_library('pulsecommon-' + pa_version_major_minor, dirs : privlibdir, required : true)
|
||||||
|
libpulse_dep = dependency('libpulse', required : true)
|
||||||
|
libpulse_simple_dep = dependency('libpulse-simple', required : true)
|
||||||
|
if glib_dep.found()
|
||||||
|
libpulse_mainloop_glib_dep = dependency('libpulse-mainloop-glib', required : true)
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
|
||||||
libpulsecommon = shared_library('pulsecommon-' + pa_version_major_minor,
|
libpulsecommon = shared_library('pulsecommon-' + pa_version_major_minor,
|
||||||
libpulsecommon_sources,
|
libpulsecommon_sources,
|
||||||
libpulsecommon_headers,
|
libpulsecommon_headers,
|
||||||
|
|
@ -207,6 +216,8 @@ libpulsecommon = shared_library('pulsecommon-' + pa_version_major_minor,
|
||||||
libpulsecommon_dep = declare_dependency(link_with: libpulsecommon)
|
libpulsecommon_dep = declare_dependency(link_with: libpulsecommon)
|
||||||
|
|
||||||
subdir('pulse')
|
subdir('pulse')
|
||||||
|
endif
|
||||||
|
|
||||||
if get_option('daemon')
|
if get_option('daemon')
|
||||||
subdir('pulsecore')
|
subdir('pulsecore')
|
||||||
subdir('daemon')
|
subdir('daemon')
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,7 @@ gsettings_helper = executable('gsettings-helper',
|
||||||
gsettings_helper_sources,
|
gsettings_helper_sources,
|
||||||
c_args : pa_c_args,
|
c_args : pa_c_args,
|
||||||
include_directories : [configinc, topinc],
|
include_directories : [configinc, topinc],
|
||||||
link_with : [libpulsecommon, libpulse],
|
dependencies : [gio_dep, libpulsecommon_dep, libpulse_dep],
|
||||||
dependencies : [gio_dep],
|
|
||||||
install_dir : pulselibexecdir,
|
install_dir : pulselibexecdir,
|
||||||
install_rpath : privlibdir,
|
install_rpath : privlibdir,
|
||||||
install : true,
|
install : true,
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,6 @@ default_tests += [
|
||||||
[ check_dep, libpulse_dep, libpulsecommon_dep ] ],
|
[ check_dep, libpulse_dep, libpulsecommon_dep ] ],
|
||||||
[ 'json-test', 'json-test.c',
|
[ 'json-test', 'json-test.c',
|
||||||
[ check_dep, libpulse_dep, libpulsecommon_dep ] ],
|
[ check_dep, libpulse_dep, libpulsecommon_dep ] ],
|
||||||
[ 'mainloop-test', 'mainloop-test.c',
|
|
||||||
[ check_dep, libpulse_dep, libpulsecommon_dep ] ],
|
|
||||||
[ 'proplist-test', 'proplist-test.c',
|
[ 'proplist-test', 'proplist-test.c',
|
||||||
[ check_dep, libpulse_dep, libpulsecommon_dep ] ],
|
[ check_dep, libpulse_dep, libpulsecommon_dep ] ],
|
||||||
[ 'thread-mainloop-test', 'thread-mainloop-test.c',
|
[ 'thread-mainloop-test', 'thread-mainloop-test.c',
|
||||||
|
|
@ -32,6 +30,13 @@ default_tests += [
|
||||||
[ check_dep, libm_dep, libpulse_dep, libpulsecommon_dep ] ],
|
[ check_dep, libm_dep, libpulse_dep, libpulsecommon_dep ] ],
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if not get_option('daemon-only')
|
||||||
|
default_tests += [
|
||||||
|
[ 'mainloop-test', 'mainloop-test.c',
|
||||||
|
[ check_dep, libpulse_dep, libpulsecommon_dep ] ],
|
||||||
|
]
|
||||||
|
endif
|
||||||
|
|
||||||
if get_option('daemon')
|
if get_option('daemon')
|
||||||
default_tests += [
|
default_tests += [
|
||||||
[ 'asyncmsgq-test', 'asyncmsgq-test.c',
|
[ 'asyncmsgq-test', 'asyncmsgq-test.c',
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
if not get_option('daemon-only')
|
||||||
pacat_sources = [
|
pacat_sources = [
|
||||||
'pacat.c',
|
'pacat.c',
|
||||||
]
|
]
|
||||||
|
|
@ -41,6 +42,7 @@ executable('pactl',
|
||||||
dependencies : [sndfile_dep, libintl_dep],
|
dependencies : [sndfile_dep, libintl_dep],
|
||||||
c_args : pa_c_args,
|
c_args : pa_c_args,
|
||||||
)
|
)
|
||||||
|
endif
|
||||||
|
|
||||||
if get_option('daemon')
|
if get_option('daemon')
|
||||||
if host_machine.system() != 'windows'
|
if host_machine.system() != 'windows'
|
||||||
|
|
@ -53,8 +55,7 @@ if get_option('daemon')
|
||||||
install: true,
|
install: true,
|
||||||
install_rpath : privlibdir,
|
install_rpath : privlibdir,
|
||||||
include_directories : [configinc, topinc],
|
include_directories : [configinc, topinc],
|
||||||
link_with : [libpulsecommon, libpulse],
|
dependencies: [libintl_dep, libpulsecommon_dep, libpulse_dep],
|
||||||
dependencies: [libintl_dep],
|
|
||||||
c_args : pa_c_args,
|
c_args : pa_c_args,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -67,13 +68,13 @@ if get_option('daemon')
|
||||||
install: true,
|
install: true,
|
||||||
install_rpath : privlibdir,
|
install_rpath : privlibdir,
|
||||||
include_directories : [configinc, topinc],
|
include_directories : [configinc, topinc],
|
||||||
link_with : [libpulsecommon, libpulse],
|
dependencies: [libintl_dep, libpulsecommon_dep, libpulse_dep],
|
||||||
dependencies: [libintl_dep],
|
|
||||||
c_args : pa_c_args,
|
c_args : pa_c_args,
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if not get_option('daemon-only')
|
||||||
if x11_dep.found()
|
if x11_dep.found()
|
||||||
pax11publish_sources = [
|
pax11publish_sources = [
|
||||||
'pax11publish.c',
|
'pax11publish.c',
|
||||||
|
|
@ -121,3 +122,4 @@ if dbus_dep.found() and fftw_dep.found()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
install_data('pa-info', install_dir : bindir)
|
install_data('pa-info', install_dir : bindir)
|
||||||
|
endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue