[pulseaudio-commits] [Git][pulseaudio/pavucontrol][master] meson: Define HAVE_PULSE_MESSAGING_API when available

Arun Raghavan (@arun) gitlab at gitlab.freedesktop.org
Tue Apr 19 13:00:06 UTC 2022



Arun Raghavan pushed to branch master at PulseAudio / pavucontrol


Commits:
8f04dad2 by Jan Alexander Steffens (heftig) at 2022-04-13T16:05:19+00:00
meson: Define HAVE_PULSE_MESSAGING_API when available

To match the autotools build.

- - - - -


2 changed files:

- meson.build
- src/meson.build


Changes:

=====================================
meson.build
=====================================
@@ -6,6 +6,8 @@ project('pavucontrol', 'cpp',
 
 with_lynx = get_option('lynx')
 
+cpp = meson.get_compiler('cpp')
+
 gtkmm_dep = dependency('gtkmm-3.0', version : '>= 3.0', required : true)
 sigcpp_dep = dependency('sigc++-2.0', 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)
 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)
 tidy = find_program('tidy', required: false)
 


=====================================
src/meson.build
=====================================
@@ -14,12 +14,20 @@ pavucontrol_sources = [
   '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',
   pavucontrol_sources,
   install: true,
-  cpp_args: ['-DHAVE_CONFIG_H'],
+  cpp_args: pavucontrol_defines,
   include_directories : configinc,
-  dependencies : [gtkmm_dep, sigcpp_dep, canberragtk_dep, libpulse_dep, libpulsemlglib_dep],
+  dependencies : pavucontrol_deps,
 )
 
 install_data('pavucontrol.glade')



View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pavucontrol/-/commit/8f04dad2c059ec642f82cc4b848ec461756bf8d2

-- 
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pavucontrol/-/commit/8f04dad2c059ec642f82cc4b848ec461756bf8d2
You're receiving this email because of your account on gitlab.freedesktop.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20220419/bc29ad00/attachment-0001.htm>


More information about the pulseaudio-commits mailing list