summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-07-07 13:15:20 -0400
committerDavid Robillard <d@drobilla.net>2022-08-18 02:31:59 -0400
commit6ef785fad5cb4e9c162f295d7434d5690a13d029 (patch)
tree2d645f1efa9df5e2dab56b76a5c0cbef941d2178 /meson.build
parentf31d96e901bfdbe5f05dc9ae077203c58a9f715a (diff)
downloaddrobillad-6ef785fad5cb4e9c162f295d7434d5690a13d029.tar.gz
drobillad-6ef785fad5cb4e9c162f295d7434d5690a13d029.tar.bz2
drobillad-6ef785fad5cb4e9c162f295d7434d5690a13d029.zip
Switch to meson build system
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build77
1 files changed, 77 insertions, 0 deletions
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..d895639
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,77 @@
+project('drobillad', ['c', 'cpp'],
+ version: '0.0.0',
+ license: 'GPLv3+',
+ meson_version: '>= 0.56.0',
+ default_options: [
+ 'b_ndebug=if-release',
+ 'buildtype=release',
+ 'c_std=c99',
+ 'cpp_std=c++14',
+ ])
+
+#######################
+# Compilers and Flags #
+#######################
+
+# Required tools
+pkg = import('pkgconfig')
+cc = meson.get_compiler('c')
+cpp = meson.get_compiler('cpp')
+
+# Set global warning flags
+if get_option('strict') and not meson.is_subproject()
+ subdir('meson/warnings')
+endif
+
+##########################
+# LV2 Path Configuration #
+##########################
+
+lv2dir = get_option('lv2dir')
+if lv2dir == ''
+ prefix = get_option('prefix')
+ if target_machine.system() == 'darwin' and prefix == '/'
+ lv2dir = '/Library/Audio/Plug-Ins/LV2'
+ elif target_machine.system() == 'haiku' and prefix == '/'
+ lv2dir = '/boot/common/add-ons/lv2'
+ elif target_machine.system() == 'windows' and prefix == 'C:/'
+ lv2dir = 'C:/Program Files/Common/LV2'
+ else
+ lv2dir = prefix / get_option('libdir') / 'lv2'
+ endif
+endif
+
+###############
+# Subprojects #
+###############
+
+lv2kit = subproject('lv2kit', required: get_option('lv2kit'))
+
+lilv_dep = lv2kit.get_variable('lilv_dep')
+lv2_dep = lv2kit.get_variable('lv2_dep')
+serd_dep = lv2kit.get_variable('serd_dep')
+sord_dep = lv2kit.get_variable('sord_dep')
+sratom_dep = lv2kit.get_variable('sratom_dep')
+suil_dep = lv2kit.get_variable('suil_dep')
+
+lv2dir = lv2_dep.get_variable(
+ default_value: lv2dir,
+ internal: 'lv2dir',
+ pkgconfig: 'lv2dir',
+ pkgconfig_define: ['prefix', '/prefix'],
+)
+
+# LV2 plugins
+blop_lv2 = subproject('blop.lv2', required: get_option('plugins'))
+fomp_lv2 = subproject('fomp.lv2', required: get_option('plugins'))
+mda_lv2 = subproject('mda.lv2', required: get_option('plugins'))
+
+# Libraries
+ganv = subproject('ganv', required: get_option('ganv'))
+raul = subproject('raul', required: get_option('raul'))
+
+# Applications
+ingen = subproject('ingen', required: get_option('ingen'))
+jalv = subproject('jalv', required: get_option('jalv'))
+# machina = subproject('machina', required: get_option('machina')))
+patchage = subproject('patchage', required: get_option('patchage'))