meson: Add optional Gtk+ support

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
This commit is contained in:
Arnaud Rebillout 2018-10-20 15:41:28 +07:00 committed by Arun Raghavan
parent 4325393499
commit 639c54546d
3 changed files with 9 additions and 1 deletions

View file

@ -235,6 +235,11 @@ if glib_dep.found()
cdata.set('HAVE_GLIB', 1)
endif
gtk_dep = dependency('gtk+-3.0', required : get_option('gtk'))
if gtk_dep.found()
cdata.set('HAVE_GTK', 1)
endif
x11_dep = dependency('x11-xcb', required : get_option('x11'))
if x11_dep.found()
xcb_dep = dependency('xcb', required : true, version : '>= 1.6')

View file

@ -41,6 +41,9 @@ option('fftw',
option('glib',
type : 'feature', value : 'auto',
description : 'Optional GLib 2 support')
option('gtk',
type : 'feature', value : 'auto',
description : 'Optional Gtk+ 3 support')
option('hal-compat',
type : 'boolean',
description : 'Optional HAL->udev transition compatibility support (needs udev)')

View file

@ -182,7 +182,7 @@ libpulsecommon = shared_library('pulsecommon-' + pa_version_major_minor,
include_directories : [configinc, topinc],
c_args : [pa_c_args],
install : true,
dependencies : [libm_dep, thread_dep, shm_dep, sndfile_dep, dbus_dep, x11_dep, systemd_dep, glib_dep],
dependencies : [libm_dep, thread_dep, shm_dep, sndfile_dep, dbus_dep, x11_dep, systemd_dep, glib_dep, gtk_dep],
implicit_include_directories : false)
libpulsecommon_dep = declare_dependency(link_with: libpulsecommon)