aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Hanspeter Portner <dev@open-music-kontrollers.ch>2018-12-07 10:11:13 +0100
committerGravatar Hanspeter Portner <dev@open-music-kontrollers.ch>2018-12-07 10:11:13 +0100
commitbaf155ce085fab691a9c30bed8a38afb1c99b333 (patch)
treed3e7249daae46f40ea98a83919b0727eb3ab11f7
parentcf69791f458d98544ac38585d3f76b0028387963 (diff)
downloadsynthpod-baf155ce085fab691a9c30bed8a38afb1c99b333.zip
synthpod-baf155ce085fab691a9c30bed8a38afb1c99b333.tar.gz
synthpod-baf155ce085fab691a9c30bed8a38afb1c99b333.tar.bz2
synthpod-baf155ce085fab691a9c30bed8a38afb1c99b333.tar.xz
conditionally build components via meson options.
-rw-r--r--VERSION2
-rw-r--r--bin/meson.build16
-rw-r--r--meson.build47
-rw-r--r--meson_options.txt8
-rw-r--r--plugins/meson.build32
5 files changed, 62 insertions, 43 deletions
diff --git a/VERSION b/VERSION
index 5abb640..20fc962 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.1.5831
+0.1.5853
diff --git a/bin/meson.build b/bin/meson.build
index c5b407c..8917d58 100644
--- a/bin/meson.build
+++ b/bin/meson.build
@@ -6,7 +6,7 @@ bin = static_library('synthpod_bin', bin_srcs,
c_args : c_args,
dependencies : bin_deps)
-if true
+if use_dummy
dummy_srcs = ['synthpod_dummy.c']
dummy = executable('synthpod_dummy', dummy_srcs,
@@ -19,7 +19,7 @@ if true
install_man('synthpod_dummy.1')
endif
-if alsa_dep.found() and zita_dep.found()
+if use_alsa and alsa_dep.found() and zita_dep.found()
alsa_srcs = ['synthpod_alsa.c', 'pcmi.cpp']
alsa = executable('synthpod_alsa', alsa_srcs,
@@ -32,7 +32,7 @@ if alsa_dep.found() and zita_dep.found()
install_man('synthpod_alsa.1')
endif
-if jack_dep.found()
+if use_jack and jack_dep.found()
jack_srcs = ['synthpod_jack.c']
jack_c_args = []
@@ -51,7 +51,7 @@ if jack_dep.found()
install_man('synthpod_jack.1')
endif
-if xcb_dep.found() and xcbicccm_dep.found()
+if use_x11 and xcb_dep.found() and xcbicccm_dep.found()
x11_srcs = ['synthpod_sandbox_x11.c']
x11 = executable('synthpod_sandbox_x11', x11_srcs,
@@ -62,7 +62,7 @@ if xcb_dep.found() and xcbicccm_dep.found()
install : true)
endif
-if gtk2_dep.found()
+if use_gtk2 and gtk2_dep.found()
gtk2_srcs = ['synthpod_sandbox_gtk.c']
gtk2 = executable('synthpod_sandbox_gtk2', gtk2_srcs,
@@ -73,7 +73,7 @@ if gtk2_dep.found()
install : true)
endif
-if gtk3_dep.found()
+if use_gtk3 and gtk3_dep.found()
gtk3_srcs = ['synthpod_sandbox_gtk.c']
gtk3 = executable('synthpod_sandbox_gtk3', gtk3_srcs,
@@ -84,7 +84,7 @@ if gtk3_dep.found()
install : true)
endif
-if qt4_dep.found()
+if use_qt4 and qt4_dep.found()
qt4_mod = import('qt4')
qt4_srcs = ['synthpod_sandbox_qt.cpp']
qt4_mocs = qt4_mod.preprocess(moc_sources : qt4_srcs)
@@ -98,7 +98,7 @@ if qt4_dep.found()
install : true)
endif
-if qt5_dep.found()
+if use_qt5 and qt5_dep.found()
qt5_mod = import('qt5')
qt5_srcs = ['synthpod_sandbox_qt.cpp']
qt5_mocs = qt5_mod.preprocess(moc_sources : qt5_srcs)
diff --git a/meson.build b/meson.build
index 896239d..8171612 100644
--- a/meson.build
+++ b/meson.build
@@ -29,23 +29,32 @@ bin_incs = [inc_incs, app_incs, xpress_incs, osc_incs, canvas_incs, extui_incs,
static_link = meson.is_cross_build() and false #FIXME
+use_jack = get_option('use-jack')
+use_alsa = get_option('use-alsa')
+use_dummy = get_option('use-dummy')
+use_x11 = get_option('use-x11')
+use_gtk2 = get_option('use-gtk2')
+use_gtk3 = get_option('use-gtk3')
+use_qt4 = get_option('use-qt4')
+use_qt5 = get_option('use-qt5')
+
m_dep = cc.find_library('m')
rt_dep = cc.find_library('rt')
lv2_dep = dependency('lv2', version : '>=1.14.0')
thread_dep = dependency('threads')
lilv_dep = dependency('lilv-0', version : '>=0.24.0', static : static_link)
-alsa_dep = dependency('alsa', version : '>=1.1.0', required : false)
-zita_dep = cc.find_library('zita-alsa-pcmi', required : false)
-jack_dep = dependency('jack', required : false)
-gl_dep = dependency('gl', required : false)
-x11_dep = dependency('x11', version : '>=1.6.0', required : false)
-xext_dep = dependency('xext', version : '>=1.3.0', required : false)
-xcb_dep = dependency('xcb', version : '>=1.12', required : false)
-xcbicccm_dep = dependency('xcb-icccm', version : '>=0.4.0', required : false)
-gtk2_dep = dependency('gtk+-2.0', version : '>=2.24', required : false)
-gtk3_dep = dependency('gtk+-3.0', version : '>=3.22', required : false)
-qt4_dep = dependency('qt4', modules : ['Core', 'Gui'], required : false)
-qt5_dep = dependency('qt5', modules : ['Core', 'Widgets', 'Gui'], required : false)
+alsa_dep = dependency('alsa', version : '>=1.1.0', required : use_alsa)
+zita_dep = cc.find_library('zita-alsa-pcmi', required : use_alsa)
+jack_dep = dependency('jack', required : use_jack)
+gl_dep = dependency('gl', required : use_x11)
+x11_dep = dependency('x11', version : '>=1.6.0', required : use_x11)
+xext_dep = dependency('xext', version : '>=1.3.0', required : use_x11)
+xcb_dep = dependency('xcb', version : '>=1.12', required : use_x11)
+xcbicccm_dep = dependency('xcb-icccm', version : '>=0.4.0', required : use_x11)
+gtk2_dep = dependency('gtk+-2.0', version : '>=2.24', required : use_gtk2)
+gtk3_dep = dependency('gtk+-3.0', version : '>=3.22', required : use_gtk3)
+qt4_dep = dependency('qt4', modules : ['Core', 'Gui'], required : use_qt4)
+qt5_dep = dependency('qt5', modules : ['Core', 'Widgets', 'Gui'], required : use_qt5)
cairo_dep = dependency('cairo', static : static_link, required : false)
bin_deps = [m_dep, rt_dep, lv2_dep, thread_dep, lilv_dep]
@@ -67,36 +76,36 @@ if get_option('dynamic-parallelizer')
add_project_arguments('-DUSE_DYNAMIC_PARALLELIZER', language : 'c')
endif
-if gl_dep.found()
+if use_x11 and gl_dep.found()
add_project_arguments('-DPUGL_HAVE_GL', language : 'c')
endif
-if xcb_dep.found() and xcbicccm_dep.found()
+if use_x11 and xcb_dep.found() and xcbicccm_dep.found()
message('building X11 sandbox')
add_project_arguments('-DSANDBOX_X11', language : 'c')
endif
-if gtk2_dep.found()
+if use_gtk2 and gtk2_dep.found()
message('building GTK2 sandbox')
add_project_arguments('-DSANDBOX_GTK2', language : 'c')
endif
-if gtk3_dep.found()
+if use_gtk3 and gtk3_dep.found()
message('building GTK3 sandbox')
add_project_arguments('-DSANDBOX_GTK3', language : 'c')
endif
-if qt4_dep.found()
+if use_qt4 and qt4_dep.found()
message('building QT4 sandbox')
add_project_arguments('-DSANDBOX_QT4', language : 'c')
endif
-if qt5_dep.found()
+if use_qt5 and qt5_dep.found()
message('building QT5 sandbox')
add_project_arguments('-DSANDBOX_QT5', language : 'c')
endif
-if cairo_dep.found()
+if use_x11 and cairo_dep.found()
message('using cairo canvas')
add_project_arguments('-DUSE_CAIRO_CANVAS', language : 'c')
endif
diff --git a/meson_options.txt b/meson_options.txt
index eb2b370..8bb52c4 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1 +1,9 @@
option('dynamic-parallelizer', type : 'boolean', value : true)
+option('use-jack', type : 'boolean', value : true)
+option('use-alsa', type : 'boolean', value : true)
+option('use-dummy', type : 'boolean', value : true)
+option('use-x11', type : 'boolean', value : true)
+option('use-qt4', type : 'boolean', value : true)
+option('use-qt5', type : 'boolean', value : true)
+option('use-gtk2', type : 'boolean', value : true)
+option('use-gtk3', type : 'boolean', value : true)
diff --git a/plugins/meson.build b/plugins/meson.build
index 60a0634..8cf66d1 100644
--- a/plugins/meson.build
+++ b/plugins/meson.build
@@ -47,14 +47,23 @@ elif host_machine.system() == 'darwin'
#ui_srcs += join_paths('..', 'pugl', 'pugl', 'pugl_osx.m')
endif
-ui = shared_module('synthpod_nk', ui_srcs,
- c_args : c_args,
- include_directories : bin_incs,
- name_prefix : '',
- dependencies : ui_deps,
- link_with : [sbox_master],
- install : true,
- install_dir : plug_dir)
+if use_x11
+ ui = shared_module('synthpod_nk', ui_srcs,
+ c_args : c_args,
+ include_directories : bin_incs,
+ name_prefix : '',
+ dependencies : ui_deps,
+ link_with : [sbox_master],
+ install : true,
+ install_dir : plug_dir)
+
+ custom_target('synthpod_ui_ttl',
+ input : 'synthpod_ui.ttl',
+ output : 'synthpod_ui.ttl',
+ command : clone,
+ install : true,
+ install_dir : plug_dir)
+endif
configure_file(input : 'manifest.ttl.in', output : 'manifest.ttl',
configuration : conf_data,
@@ -68,13 +77,6 @@ custom_target('synthpod_ttl',
install : true,
install_dir : plug_dir)
-custom_target('synthpod_ui_ttl',
- input : 'synthpod_ui.ttl',
- output : 'synthpod_ui.ttl',
- command : clone,
- install : true,
- install_dir : plug_dir)
-
#FIXME paths
install_data('../data/font/Abel-Regular.ttf', install_dir : plug_dir)