fix: make pre/post fader metering switch label/tooltip translatable
[jack_mixer.git] / meson.build
blob6db5119216fae6689554b2081cc6615478419c20
1 project(
2     'jack_mixer',
3     'c',
4     version: '17',
5     license: 'GPL2+',
6     default_options: [
7         'warning_level=2'
8     ],
9     meson_version: '>=0.53.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         modules: get_option('check-py-modules') ? ['gi', 'cairo', 'xdg'] : []
37     )
38 endif
40 # Installation directories
41 prefix = get_option('prefix')
42 bindir = join_paths(prefix, get_option('bindir'))
43 datadir = join_paths(prefix, get_option('datadir'))
44 #localedir = join_paths(prefix, get_option('localedir'))
45 #pythondir = join_paths(prefix, python.get_path('purelib'))
46 desktopdir = join_paths(datadir, 'applications')
47 icondir = join_paths(datadir, 'icons', 'hicolor')
48 raysessiondir = join_paths('/', 'etc', 'xdg', 'raysession', 'client_templates', '35_jackmixer')
50 # Build jack_mix_box and generate _jack_mixer extension source
51 subdir('src')
53 # Build & install C extension module and Python package
54 if get_option('gui').enabled()
55     subdir('jack_mixer')
56 endif
58 # Install desktop file and icons
59 if get_option('gui').enabled()
60     subdir('data')
61 endif
63 # Install documentation
64 subdir('docs')
66 if get_option('gui').enabled() and not get_option('wheel')
67     meson.add_install_script('meson_postinstall.py')
68 endif
70 summary({
71     'Build jack_mixer GUI': get_option('gui').enabled(),
72     'JACK MIDI support': get_option('jack-midi').enabled(),
73     'Debug messages (verbose)': get_option('verbose'),
74     'Build for wheel': get_option('wheel'),
75 }, section: 'Configuration')