LV2 subproject with meson
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

143 lines
4.6 KiB

project('lv2', ['c'],
version: '1.18.3',
license: 'ISC',
meson_version: '>= 0.49.2',
default_options: [
# Load build tools
pkg = import('pkgconfig')
cc = meson.get_compiler('c')
# Set ultra strict warnings for developers, if requested
if get_option('strict')
c_warnings = all_c_warnings
if cc.get_id() == 'clang'
c_warnings += [
elif cc.get_id() == 'gcc'
c_warnings += [
elif cc.get_id() == 'msvc'
c_warnings += [
'/wd4061', # enumerator in switch is not explicitly handled
'/wd4100', # unreferenced formal parameter
'/wd4244', # conversion with possible loss of data
'/wd4267', # conversion from size_t to a smaller type
'/wd4310', # cast truncates constant value
'/wd4365', # signed/unsigned mismatch
'/wd4464', # relative include path contains ".."
'/wd4514', # unreferenced inline function has been removed
'/wd4706', # assignment within conditional expression
'/wd4710', # function not inlined
'/wd4711', # function selected for automatic inline expansion
'/wd4820', # padding added after construct
'/wd5045', # will insert Spectre mitigation for memory load
language: ['c'])
if host_machine.system() == 'darwin'
lv2dir = '/Library/Audio/Plug-Ins/LV2'
default_lv2_path = [
elif host_machine.system() == 'haiku'
default_lv2_path = [
elif host_machine.system() == 'win32'
lv2dir = env_path('COMMONPROGRAMFILES', 'LV2')
default_lv2_path = [
libdirname = get_option('libdir')
lv2dir = get_option('prefix') / get_option('libdir')
default_lv2_path = [
# Map of specification base name to old URI-style include path
spec_map = {
'atom': 'lv2/',
'buf-size': 'lv2/',
'core': 'lv2/',
'data-access': 'lv2/',
'dynmanifest': 'lv2/',
'event': 'lv2/',
'instance-access': 'lv2/',
'log': 'lv2/',
'midi': 'lv2/',
'morph': 'lv2/',
'options': 'lv2/',
'parameters': 'lv2/',
'patch': 'lv2/',
'port-groups': 'lv2/',
'port-props': 'lv2/',
'presets': 'lv2/',
'resize-port': 'lv2/',
'state': 'lv2/',
'time': 'lv2/',
'ui': 'lv2/',
'units': 'lv2/',
'uri-map': 'lv2/',
'urid': 'lv2/',
'worker': 'lv2/',
lv2_dep = declare_dependency(
include_directories: include_directories('.'),
version: meson.project_version())
# plugins/eg-fifths.lv2/uris.h
# plugins/eg-params.lv2/state_map.h
# plugins/eg-sampler.lv2/atom_sink.h
# plugins/eg-sampler.lv2/peaks.h
# plugins/eg-sampler.lv2/uris.h
# plugins/eg-scope.lv2/uris.h