CHANGELOG.md: Adjust for LADIOS jack_mixer
[jack_mixer.git] / meson.build
blobd5199191f76a169eea2d257febf582e98056e10a
1 project(
2     'jack_mixer',
3     'c',
4     version: '18',
5     license: 'GPL2+',
6     default_options: [
7         'warning_level=2'
8     ],
9     meson_version: '>=0.64.0'
12 # Dependencies
13 cc = meson.get_compiler('c')
14 glib_dep = dependency('glib-2.0')
15 math_dep = cc.find_library('m', required: false)
16 jack2_dep = dependency('jack', version:'>=1.9.11', required: false)
17 jack1_dep = dependency('jack', version:'>=0.125.0, <1.0', required: false)
19 if not jack2_dep.found() and jack1_dep.found()
20     jack_dep = jack1_dep
21 elif jack2_dep.found()
22     jack_dep = jack2_dep
23 else
24     error('No recent enough (jack2>=1.9.11 or jack1>=0.125.0) version of JACK found.')
25 endif
27 if get_option('gui').disabled() and get_option('jack-midi').disabled()
28     error('Disabling both GUI and JACK-MIDI is not supported.')
29 endif
31 if get_option('gui').enabled()
32     pymod = import('python')
33     python = pymod.find_installation(
34         'python3',
35         required: true,
36         pure: false,
37         modules: get_option('check-py-modules') ? ['gi', 'cairo', 'appdirs'] : []
38     )
39 endif
41 # Installation directories
42 prefix = get_option('prefix')
43 bindir = join_paths(prefix, get_option('bindir'))
44 datadir = join_paths(prefix, get_option('datadir'))
45 #localedir = join_paths(prefix, get_option('localedir'))
46 #pythondir = join_paths(prefix, python.get_path('purelib'))
47 desktopdir = join_paths(datadir, 'applications')
48 icondir = join_paths(datadir, 'icons', 'hicolor')
49 raysessiondir = join_paths('/', 'etc', 'xdg', 'raysession', 'client_templates', '35_jackmixer')
51 # Build jack_mix_box and generate _jack_mixer extension source
52 subdir('src')
54 # Build & install C extension module and Python package
55 if get_option('gui').enabled()
56     subdir('jack_mixer')
57 endif
59 # Install desktop file and icons
60 if get_option('gui').enabled()
61     subdir('data')
62 endif
64 # Install documentation
65 subdir('docs')
67 if get_option('gui').enabled() and not get_option('wheel')
68     meson.add_install_script('meson_postinstall.py')
69 endif
71 summary({
72     'Build jack_mixer GUI': get_option('gui').enabled(),
73     'JACK MIDI support': get_option('jack-midi').enabled(),
74     'Debug messages (verbose)': get_option('verbose'),
75     'Build for wheel': get_option('wheel'),
76 }, section: 'Configuration')