Debian Codegraph @

ext/a52dec/meson.build

raw
1 a52dec_opt = get_option('a52dec').require(gpl_allowed, error_message: '''
2 Plugin a52dec explicitly required via options but GPL-licensed plugins disabled via options.
3 Pass option -Dgpl=enabled to Meson to allow GPL-licensed plugins to be built.
4 ''')
5
6 a52dec_sources = [
7 'gsta52dec.c',
8 ]
9
10 a52dec_headers = [
11 'gsta52dec.h',
12 ]
13
14 doc_sources = []
15 foreach s: a52dec_sources + a52dec_headers
16 doc_sources += meson.current_source_dir() / s
17 endforeach
18
19 plugin_sources += {
20 'a52dec': pathsep.join(doc_sources)
21 }
22
23 a52_dep = cc.find_library('a52', required : get_option('a52dec'))
24 if a52_dep.found()
25 have_a52_h = cc.has_header_symbol('a52dec/a52.h', 'a52_init', prefix : '#include <stdint.h>')
26
27 if have_a52_h
28 a52dec = library('gsta52dec',
29 a52dec_sources,
30 c_args : ugly_args,
31 include_directories : [configinc],
32 dependencies : [gstaudio_dep, a52_dep],
33 install : true,
34 install_dir : plugins_install_dir,
35 )
36 plugins += [a52dec]
37 elif a52dec_opt.enabled()
38 error('a52dec plugin enabled but a52.h not found')
39 endif
40 endif