meson: Define HAVE_PULSE_MESSAGING_API when available
To match the autotools build.
This commit is contained in:
parent
964f2987a4
commit
8f04dad2c0
|
@ -6,6 +6,8 @@ project('pavucontrol', 'cpp',
|
||||||
|
|
||||||
with_lynx = get_option('lynx')
|
with_lynx = get_option('lynx')
|
||||||
|
|
||||||
|
cpp = meson.get_compiler('cpp')
|
||||||
|
|
||||||
gtkmm_dep = dependency('gtkmm-3.0', version : '>= 3.0', required : true)
|
gtkmm_dep = dependency('gtkmm-3.0', version : '>= 3.0', required : true)
|
||||||
sigcpp_dep = dependency('sigc++-2.0', required : true)
|
sigcpp_dep = dependency('sigc++-2.0', required : true)
|
||||||
canberragtk_dep = dependency('libcanberra-gtk3', version : '>= 0.16', required : true)
|
canberragtk_dep = dependency('libcanberra-gtk3', version : '>= 0.16', required : true)
|
||||||
|
@ -13,6 +15,12 @@ canberragtk_dep = dependency('libcanberra-gtk3', version : '>= 0.16', required :
|
||||||
libpulse_dep = dependency('libpulse', version : '>= 5.0', required : true)
|
libpulse_dep = dependency('libpulse', version : '>= 5.0', required : true)
|
||||||
libpulsemlglib_dep = dependency('libpulse-mainloop-glib', version : '>= 0.9.16', required : true)
|
libpulsemlglib_dep = dependency('libpulse-mainloop-glib', version : '>= 0.9.16', required : true)
|
||||||
|
|
||||||
|
have_pulse_messaging_api = cpp.has_function('pa_context_send_message_to_object',
|
||||||
|
dependencies: [libpulse_dep],
|
||||||
|
)
|
||||||
|
|
||||||
|
json_glib_dep = dependency('json-glib-1.0', required : have_pulse_messaging_api)
|
||||||
|
|
||||||
lynx = find_program('lynx', required: with_lynx)
|
lynx = find_program('lynx', required: with_lynx)
|
||||||
tidy = find_program('tidy', required: false)
|
tidy = find_program('tidy', required: false)
|
||||||
|
|
||||||
|
|
|
@ -14,12 +14,20 @@ pavucontrol_sources = [
|
||||||
'streamwidget.cc',
|
'streamwidget.cc',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
pavucontrol_deps = [gtkmm_dep, sigcpp_dep, canberragtk_dep, libpulse_dep, libpulsemlglib_dep]
|
||||||
|
pavucontrol_defines = ['-DHAVE_CONFIG_H']
|
||||||
|
|
||||||
|
if have_pulse_messaging_api
|
||||||
|
pavucontrol_deps += [json_glib_dep]
|
||||||
|
pavucontrol_defines += ['-DHAVE_PULSE_MESSAGING_API']
|
||||||
|
endif
|
||||||
|
|
||||||
executable('pavucontrol',
|
executable('pavucontrol',
|
||||||
pavucontrol_sources,
|
pavucontrol_sources,
|
||||||
install: true,
|
install: true,
|
||||||
cpp_args: ['-DHAVE_CONFIG_H'],
|
cpp_args: pavucontrol_defines,
|
||||||
include_directories : configinc,
|
include_directories : configinc,
|
||||||
dependencies : [gtkmm_dep, sigcpp_dep, canberragtk_dep, libpulse_dep, libpulsemlglib_dep],
|
dependencies : pavucontrol_deps,
|
||||||
)
|
)
|
||||||
|
|
||||||
install_data('pavucontrol.glade')
|
install_data('pavucontrol.glade')
|
||||||
|
|
Loading…
Reference in New Issue