Revert "jack_mixer.desktop, add NSM keys (#186)" until nsm code does not cause ladish...
[jack_mixer.git] / src / meson.build
blob87603de1e643745ac70f32d2d0ca02dd463be2a0
1 jack_mixer_sources = files([
2     'jack_mixer.c',
3     'log.c',
4     'scale.c'
5 ])
7 jack_mixer_inc = include_directories('.')
10 # Build 'jack_mix_box' command line program
11 defines = ['-DLOCALEDIR="@0@"'.format(join_paths(get_option('prefix'), get_option('localedir')))]
13 if get_option('jack-midi').enabled()
14     defines += ['-DHAVE_JACK_MIDI']
15 endif
17 executable(
18     'jack_mix_box',
19     ['jack_mix_box.c', jack_mixer_sources],
20     dependencies: [
21         glib_dep,
22         jack_dep,
23         math_dep
24     ],
25     include_directories: jack_mixer_inc,
26     c_args: defines,
27     install: true,
31 # Generate extension module C source from Cython sources
32 if get_option('gui').enabled()
33     fs = import('fs')
35     jack_mixer_mod_pyx = '_jack_mixer.pyx'
36     jack_mixer_mod_c = '_jack_mixer.c'
38     cython = find_program('cython3', 'cython', 'cython0', required: false)
40     if fs.exists(jack_mixer_mod_c)
41         jack_mixer_cython = files(jack_mixer_mod_c)
42     elif cython.found()
43         jack_mixer_mod_pxd = '_jack_mixer.pxd'
45         jack_mixer_cython = custom_target(
46             'jack_mixer_cython',
47             output: jack_mixer_mod_c,
48             input: jack_mixer_mod_pyx,
49             depend_files: [jack_mixer_mod_pyx, jack_mixer_mod_pxd],
50             command: [cython, '-o', '@OUTPUT@', '@INPUT@'],
51         )
52     else
53         error('The \'cython\' program was not found but is required.\n' +
54               'Please install Cython from: https://pypi.org/project/Cython/.')
55     endif
57     meson.add_dist_script('meson_dist_cython.py', jack_mixer_mod_c)
58 endif