aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build45
1 files changed, 17 insertions, 28 deletions
diff --git a/meson.build b/meson.build
index 9bc32cc..685ce9c 100644
--- a/meson.build
+++ b/meson.build
@@ -5,6 +5,10 @@ project('sherlock.lv2', 'c', default_options : [
'b_lto=false',
'c_std=c11'])
+nk_pugl = subproject('nk_pugl')
+nk_pugl_dep = nk_pugl.get_variable('nk_pugl_gl')
+cousine_regular_ttf = nk_pugl.get_variable('cousine_regular_ttf')
+
build_root = meson.build_root()
static_link = meson.is_cross_build()
@@ -15,14 +19,13 @@ lv2_dep = dependency('lv2', version : '>=1.14.0')
sratom_dep = dependency('sratom-0', version : '>=0.6.0', static : static_link)
dsp_deps = [m_dep, lv2_dep]
-ui_deps = [m_dep, lv2_dep, sratom_dep]
-ui_links = []
+ui_deps = [m_dep, lv2_dep, sratom_dep, nk_pugl_dep]
-pugl_inc = include_directories('pugl')
props_inc = include_directories('props.lv2')
osc_inc = include_directories('osc.lv2')
ser_inc = include_directories('ser_atom.lv2')
-inc_dir = [pugl_inc, props_inc, osc_inc, ser_inc]
+nk_pugl_inc = include_directories(join_paths('subprojects', 'nk_pugl'))
+inc_dir = [props_inc, osc_inc, ser_inc, nk_pugl_inc]
inst_dir = join_paths(get_option('libdir'), 'lv2', meson.project_name())
@@ -43,11 +46,9 @@ lgen = generator(flex,
output : '@PLAINNAME@.c',
arguments : ['--prefix=enc', '-o', '@OUTPUT@', '@INPUT@'])
-cp = find_program('cp')
lv2_validate = find_program('lv2_validate', native : true, required : false)
sord_validate = find_program('sord_validate', native : true, required : false)
lv2lint = find_program('lv2lint', required : false)
-clone = [cp, '@INPUT@', '@OUTPUT@']
lfiles = lgen.process('encoder.l')
@@ -66,24 +67,11 @@ c_args = [
'-fvisibility=hidden']
if host_machine.system() == 'windows'
- add_languages('cpp')
conf_data.set('UI_TYPE', 'WindowsUI')
- ui_deps += cc.find_library('opengl32')
- ui_deps += cc.find_library('gdi32')
- ui_deps += cc.find_library('user32')
- ui_srcs += 'pugl/pugl/pugl_win.cpp'
elif host_machine.system() == 'darwin'
- add_languages('objc')
conf_data.set('UI_TYPE', 'CocoaUI')
- ui_links += ['-framework', 'OpenGL']
- ui_links += ['-framework', 'Cocoa']
- ui_srcs += 'pugl/pugl/pugl_osx.m'
else
conf_data.set('UI_TYPE', 'X11UI')
- ui_deps += dependency('gl')
- ui_deps += dependency('x11', version : '>=1.6.0')
- ui_deps += dependency('xext', version : '>=1.3.0')
- ui_srcs += 'pugl/pugl/pugl_x11.c'
endif
mod = shared_module('sherlock', dsp_srcs,
@@ -99,36 +87,37 @@ ui = shared_module('sherlock_nk', ui_srcs,
include_directories : inc_dir,
name_prefix : '',
dependencies : ui_deps,
- link_args : ui_links,
install : true,
install_dir : inst_dir)
suffix = mod.full_path().strip().split('.')[-1]
conf_data.set('MODULE_SUFFIX', '.' + suffix)
-manifest_ttl = configure_file(input : 'manifest.ttl.in', output : 'manifest.ttl',
+manifest_ttl = configure_file(
+ input : 'manifest.ttl.in',
+ output : 'manifest.ttl',
configuration : conf_data,
install : true,
install_dir : inst_dir)
-dsp_ttl = custom_target('dsp_ttl',
+dsp_ttl = configure_file(
input : 'sherlock.ttl',
output : 'sherlock.ttl',
- command : clone,
+ copy : true,
install : true,
install_dir : inst_dir)
-ui_ttl = custom_target('ui_ttl',
+ui_ttl = configure_file(
input : 'sherlock_ui.ttl',
output : 'sherlock_ui.ttl',
- command : clone,
+ copy : true,
install : true,
install_dir : inst_dir)
-custom_target('font',
- input : join_paths('nuklear', 'extra_font', 'Cousine-Regular.ttf'),
+configure_file(
+ input : cousine_regular_ttf,
output : 'Cousine-Regular.ttf',
- command : clone,
+ copy : true,
install : true,
install_dir : inst_dir)