1project('props.lv2', 'c', default_options : [
2	'buildtype=release',
3	'warning_level=3',
4	'werror=false',
5	'b_lto=false',
6	'c_std=c11'])
7
8add_project_arguments('-D_GNU_SOURCE', language : 'c')
9
10conf_data = configuration_data()
11cc = meson.get_compiler('c')
12
13cp = find_program('cp')
14clone = [cp, '@INPUT@', '@OUTPUT@']
15
16m_dep = cc.find_library('m')
17lv2_dep = dependency('lv2', version : '>=1.14.0')
18
19inc_dir = []
20
21inst_dir = join_paths(get_option('libdir'), 'lv2', meson.project_name())
22
23dsp_srcs = [join_paths('test', 'props.c')]
24
25c_args = ['-fvisibility=hidden',
26	'-ffast-math']
27
28mod = shared_module('props', dsp_srcs,
29	c_args : c_args,
30	include_directories : inc_dir,
31	name_prefix : '',
32	dependencies : [m_dep, lv2_dep],
33	install : true,
34	install_dir : inst_dir)
35
36version = run_command('cat', 'VERSION').stdout().strip().split('.')
37conf_data.set('MAJOR_VERSION', version[0])
38conf_data.set('MINOR_VERSION', version[1])
39conf_data.set('MICRO_VERSION', version[2])
40
41suffix = mod.full_path().strip().split('.')[-1]
42conf_data.set('MODULE_SUFFIX', '.' + suffix)
43
44configure_file(input : join_paths('test', 'manifest.ttl.in'), output : 'manifest.ttl',
45	configuration : conf_data,
46	install : true,
47	install_dir : inst_dir)
48custom_target('props_ttl',
49	input : join_paths('test', 'props.ttl'),
50	output : 'props.ttl',
51	command : clone,
52	install : true,
53	install_dir : inst_dir)
54custom_target('chunk_bin',
55	input : join_paths('test', 'chunk.bin'),
56	output : 'chunk.bin',
57	command : clone,
58	install : true,
59	install_dir : inst_dir)
60