mirror of
https://gitlab.gnome.org/GNOME/libgnome-volume-control.git
synced 2024-11-21 08:20:40 -05:00
build: Make ALSA support optional
ALSA support is not mandatory for libgnome-volume-control, but it can not be made optional. This patch makes the ALSA support optional by using an option. https://bugzilla.gnome.org/show_bug.cgi?id=792919
This commit is contained in:
parent
9a2996b362
commit
67533bffdc
23
meson.build
23
meson.build
@ -12,7 +12,6 @@ gnome = import('gnome')
|
|||||||
pkglibdir = get_option('pkglibdir')
|
pkglibdir = get_option('pkglibdir')
|
||||||
pkgdatadir = get_option('pkgdatadir')
|
pkgdatadir = get_option('pkgdatadir')
|
||||||
|
|
||||||
alsa = dependency('alsa', required: false)
|
|
||||||
gio = dependency('gio-2.0')
|
gio = dependency('gio-2.0')
|
||||||
gobject = dependency('gobject-2.0')
|
gobject = dependency('gobject-2.0')
|
||||||
libpulse = dependency('libpulse', version: '>= 2.0')
|
libpulse = dependency('libpulse', version: '>= 2.0')
|
||||||
@ -21,13 +20,6 @@ libpulse_glib = dependency('libpulse-mainloop-glib')
|
|||||||
cdata = configuration_data()
|
cdata = configuration_data()
|
||||||
cdata.set_quoted('GETTEXT_PACKAGE', get_option('package-name'))
|
cdata.set_quoted('GETTEXT_PACKAGE', get_option('package-name'))
|
||||||
cdata.set_quoted('PACKAGE_VERSION', get_option('package-version'))
|
cdata.set_quoted('PACKAGE_VERSION', get_option('package-version'))
|
||||||
cdata.set('HAVE_ALSA', alsa.found())
|
|
||||||
|
|
||||||
config = configure_file(
|
|
||||||
input: 'config.h.meson',
|
|
||||||
output: 'config.h',
|
|
||||||
configuration: cdata
|
|
||||||
)
|
|
||||||
|
|
||||||
libgvc_inc = include_directories('.')
|
libgvc_inc = include_directories('.')
|
||||||
|
|
||||||
@ -63,13 +55,18 @@ libgvc_no_gir_sources = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
libgvc_deps = [
|
libgvc_deps = [
|
||||||
alsa,
|
|
||||||
gio,
|
gio,
|
||||||
gobject,
|
gobject,
|
||||||
libpulse,
|
libpulse,
|
||||||
libpulse_glib
|
libpulse_glib
|
||||||
]
|
]
|
||||||
|
|
||||||
|
enable_alsa = get_option('alsa')
|
||||||
|
if enable_alsa
|
||||||
|
libgvc_deps += dependency('alsa')
|
||||||
|
endif
|
||||||
|
cdata.set('HAVE_ALSA', enable_alsa)
|
||||||
|
|
||||||
static = get_option('static')
|
static = get_option('static')
|
||||||
with_introspection = get_option('with-introspection')
|
with_introspection = get_option('with-introspection')
|
||||||
|
|
||||||
@ -129,7 +126,7 @@ if with_introspection
|
|||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if alsa.found()
|
if enable_alsa
|
||||||
executable('test-audio-device-selection',
|
executable('test-audio-device-selection',
|
||||||
sources: 'test-audio-device-selection.c',
|
sources: 'test-audio-device-selection.c',
|
||||||
link_with: libgvc,
|
link_with: libgvc,
|
||||||
@ -143,3 +140,9 @@ libgvc_dep = declare_dependency(
|
|||||||
include_directories: libgvc_inc,
|
include_directories: libgvc_inc,
|
||||||
dependencies: libgvc_deps
|
dependencies: libgvc_deps
|
||||||
)
|
)
|
||||||
|
|
||||||
|
config = configure_file(
|
||||||
|
input: 'config.h.meson',
|
||||||
|
output: 'config.h',
|
||||||
|
configuration: cdata
|
||||||
|
)
|
||||||
|
@ -22,6 +22,12 @@ option('pkgdatadir',
|
|||||||
description: 'The private directory the gir file will be installed into.'
|
description: 'The private directory the gir file will be installed into.'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
option('alsa',
|
||||||
|
type: 'boolean',
|
||||||
|
value: true,
|
||||||
|
description: 'Build ALSA support.'
|
||||||
|
)
|
||||||
|
|
||||||
option('static',
|
option('static',
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
value: false,
|
value: false,
|
||||||
|
Loading…
Reference in New Issue
Block a user