summaryrefslogtreecommitdiff
path: root/meson.build
blob: af6467bc7a8f5ae713a7b8468596931063c70610 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
project('pavucontrol', 'cpp',
        version : '5.0',
        meson_version : '>= 0.50.0',
        default_options : [ 'c_std=gnu11', 'cpp_std=c++17' ]
        )

with_lynx = get_option('lynx')

cpp = meson.get_compiler('cpp')

gtkmm_dep = dependency('gtkmm-4.0', version : '>= 4.0', required : true)
sigcpp_dep = dependency('sigc++-2.0', required : true)
canberragtk_dep = dependency('libcanberra', version : '>= 0.16', required : false)

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)

configinc = include_directories('.')

prefix = get_option('prefix')
datadir = join_paths(prefix, get_option('datadir'))
docdir = join_paths(datadir, 'doc', 'pavucontrol')
localedir = join_paths(prefix, get_option('localedir'))

cdata = configuration_data()
cdata.set('ENABLE_NLS', 1)
cdata.set_quoted('PACKAGE', 'pavucontrol')
cdata.set_quoted('PACKAGE_NAME', 'pavucontrol')
cdata.set_quoted('PACKAGE_STRING', 'pavucontrol')
cdata.set_quoted('PACKAGE_VERSION', meson.project_version())
cdata.set_quoted('GETTEXT_PACKAGE', 'pavucontrol')
cdata.set_quoted('LOCALEDIR', localedir)

cdata.set('HAVE_LIBCANBERRA', canberragtk_dep.found())

# Now generate config.h from everything above
configure_file(output : 'config.h', configuration : cdata)

subdir('doc')
subdir('po')
subdir('src')