aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2018-04-15 13:06:26 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2018-04-15 13:06:26 +0200
commitad32b077290b061b9203042ed4ebdc973c16410b (patch)
tree4cf4eea086342a870416dace700f0c6a33b70f92 /meson.build
downloadmonitors.lv2-ad32b077290b061b9203042ed4ebdc973c16410b.tar.xz
initial commit.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build51
1 files changed, 51 insertions, 0 deletions
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..e7bef63
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,51 @@
+project('monitors.lv2', 'c', default_options : [
+ 'buildtype=release',
+ 'warning_level=1',
+ 'werror=false',
+ 'b_lto=true',
+ 'c_std=c11'])
+
+add_project_arguments('-D_GNU_SOURCE', language : 'c')
+
+conf_data = configuration_data()
+cc = meson.get_compiler('c')
+
+cp = find_program('cp')
+clone = [cp, '@INPUT@', '@OUTPUT@']
+
+m_dep = cc.find_library('m')
+lv2_dep = dependency('lv2', version : '>=1.14.0')
+
+inst_dir = join_paths(get_option('libdir'), 'lv2', meson.project_name())
+
+srcs = ['monitors.c',
+ 'monitors_audio_wave.c']
+
+c_args = ['-fvisibility=hidden',
+ '-ffast-math']
+
+mod = shared_module('monitors', srcs,
+ c_args : c_args,
+ name_prefix : '',
+ dependencies : [m_dep, lv2_dep],
+ install : true,
+ install_dir : inst_dir)
+
+version = run_command('cat', 'VERSION').stdout().strip().split('.')
+conf_data.set('MAJOR_VERSION', version[0])
+conf_data.set('MINOR_VERSION', version[1])
+conf_data.set('MICRO_VERSION', version[2])
+
+suffix = mod.full_path().strip().split('.')[-1]
+conf_data.set('MODULE_SUFFIX', '.' + suffix)
+
+configure_file(input : 'manifest.ttl.in', output : 'manifest.ttl',
+ configuration : conf_data,
+ install : true,
+ install_dir : inst_dir)
+custom_target('monitors_ttl',
+ input : 'monitors.ttl',
+ output : 'monitors.ttl',
+ command : clone,
+ install : true,
+ install_dir : inst_dir)