Commit b12b10c1 authored by Hanspeter Portner's avatar Hanspeter Portner

meson: implement to build without UIs.

parent 7c417e8f
Pipeline #23884051 passed with stages
in 6 minutes and 43 seconds
......@@ -13,6 +13,14 @@ lv2_dep = dependency('lv2', version : '>=1.14.0')
dsp_deps = [m_dep, lv2_dep]
ui_deps = [m_dep, lv2_dep]
if host_machine.system() == 'windows'
# nothing to do for DSP
elif host_machine.system() == 'darwin'
# nothing to do for DSP
else
dsp_deps += cc.find_library('rt')
endif
canvas_inc = include_directories('canvas.lv2')
extui_inc = include_directories('ext_ui.lv2')
include_inc= include_directories('include')
......@@ -172,34 +180,6 @@ dsp_srcs = [
app_srcs = [
join_paths('test', 'moony_test.c')]
ui_srcs = [
join_paths('plugin', 'moony_ui.c'),
join_paths('plugin', 'simple_ui.c'),
join_paths('plugin', 'nk_ui.c')]
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_deps += cc.find_library('Cocoa')
#ui_deps += cc.find_library('gl')
#ui_deps += dependency('appleframeworks', modules : 'cocoa')
#ui_srcs += 'pugl/pugl/pugl_osx.m'
else
conf_data.set('UI_TYPE', 'X11UI')
dsp_deps += cc.find_library('rt')
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('moony', dsp_srcs,
c_args : c_args,
include_directories : inc_dir,
......@@ -209,14 +189,69 @@ mod = shared_module('moony', dsp_srcs,
install : true,
install_dir : inst_dir)
ui = shared_module('moony_ui', ui_srcs,
c_args : c_args,
include_directories : inc_dir,
name_prefix : '',
dependencies : ui_deps,
link_with : ui_links,
install : true,
install_dir : inst_dir)
suffix = mod.full_path().strip().split('.')[-1]
conf_data.set('MODULE_SUFFIX', '.' + suffix)
build_opengl_ui = get_option('build-opengl-ui')
build_zimple_ui = get_option('build-zimple-ui')
conf_data.set('UI', '#')
conf_data.set('UI_TYPE', 'UI')
if build_opengl_ui
message('building OpenGL UI')
conf_data.set('UI', '')
conf_data.set('UI_OPENGL', '')
else
conf_data.set('UI_OPENGL', '#')
endif
if build_zimple_ui
message('building Zimple UI')
conf_data.set('UI', '')
conf_data.set('UI_ZIMPLE', '')
else
conf_data.set('UI_ZIMPLE', '#')
endif
if build_opengl_ui or build_zimple_ui
ui_srcs = [
join_paths('plugin', 'moony_ui.c'),
join_paths('plugin', 'simple_ui.c'),
join_paths('plugin', 'nk_ui.c')]
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_deps += cc.find_library('Cocoa')
#ui_deps += cc.find_library('gl')
#ui_deps += dependency('appleframeworks', modules : 'cocoa')
#ui_srcs += 'pugl/pugl/pugl_osx.m'
else
conf_data.set('UI_TYPE', 'X11UI')
dsp_deps += cc.find_library('rt')
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
ui = shared_module('moony_ui', ui_srcs,
c_args : c_args,
include_directories : inc_dir,
name_prefix : '',
dependencies : ui_deps,
link_with : ui_links,
install : true,
install_dir : inst_dir)
endif
app = executable('moony_test', app_srcs,
c_args : c_args,
......@@ -226,12 +261,6 @@ app = executable('moony_test', app_srcs,
link_with : dsp_links,
install : false)
suffix = mod.full_path().strip().split('.')[-1]
conf_data.set('MODULE_SUFFIX', '.' + suffix)
conf_data.set('UI_EXT', '') #FIXME
conf_data.set('UI_WRAP', '') #FIXME
configure_file(
input : join_paths('plugin', 'manifest.ttl.in'),
output : 'manifest.ttl',
......
option('build-opengl-ui', type : 'boolean', value : true)
option('build-zimple-ui', type : 'boolean', value : false)
......@@ -35,9 +35,9 @@ moony:c1xc1
lv2:minorVersion @MINOR_VERSION@ ;
lv2:microVersion @MICRO_VERSION@ ;
lv2:binary <moony@MODULE_SUFFIX@> ;
@UI_WRAP@ui:ui moony:moony_ui ;
@UI_WRAP@@UI_EXT@ui:ui moony:moony_zimple_ui ;
@UI_WRAP@@UI_EXT@ui:ui moony:moony_zimple_kx ;
@UI_OPENGL@ui:ui moony:moony_ui ;
@UI_ZIMPLE@ui:ui moony:moony_zimple_ui ;
@UI_ZIMPLE@ui:ui moony:moony_zimple_kx ;
rdfs:seeAlso <moony.ttl> .
moony:c2xc2
......@@ -45,9 +45,9 @@ moony:c2xc2
lv2:minorVersion @MINOR_VERSION@ ;
lv2:microVersion @MICRO_VERSION@ ;
lv2:binary <moony@MODULE_SUFFIX@> ;
@UI_WRAP@ui:ui moony:moony_ui ;
@UI_WRAP@@UI_EXT@ui:ui moony:moony_zimple_ui ;
@UI_WRAP@@UI_EXT@ui:ui moony:moony_zimple_kx ;
@UI_OPENGL@ui:ui moony:moony_ui ;
@UI_ZIMPLE@ui:ui moony:moony_zimple_ui ;
@UI_ZIMPLE@ui:ui moony:moony_zimple_kx ;
rdfs:seeAlso <moony.ttl> .
moony:c4xc4
......@@ -55,9 +55,9 @@ moony:c4xc4
lv2:minorVersion @MINOR_VERSION@ ;
lv2:microVersion @MICRO_VERSION@ ;
lv2:binary <moony@MODULE_SUFFIX@> ;
@UI_WRAP@ui:ui moony:moony_ui ;
@UI_WRAP@@UI_EXT@ui:ui moony:moony_zimple_ui ;
@UI_WRAP@@UI_EXT@ui:ui moony:moony_zimple_kx ;
@UI_OPENGL@ui:ui moony:moony_ui ;
@UI_ZIMPLE@ui:ui moony:moony_zimple_ui ;
@UI_ZIMPLE@ui:ui moony:moony_zimple_kx ;
rdfs:seeAlso <moony.ttl> .
# atom in, atom out
......@@ -66,9 +66,9 @@ moony:a1xa1
lv2:minorVersion @MINOR_VERSION@ ;
lv2:microVersion @MICRO_VERSION@ ;
lv2:binary <moony@MODULE_SUFFIX@> ;
@UI_WRAP@ui:ui moony:moony_ui ;
@UI_WRAP@@UI_EXT@ui:ui moony:moony_zimple_ui ;
@UI_WRAP@@UI_EXT@ui:ui moony:moony_zimple_kx ;
@UI_OPENGL@ui:ui moony:moony_ui ;
@UI_ZIMPLE@ui:ui moony:moony_zimple_ui ;
@UI_ZIMPLE@ui:ui moony:moony_zimple_kx ;
rdfs:seeAlso <moony.ttl> .
moony:a2xa2
......@@ -76,9 +76,9 @@ moony:a2xa2
lv2:minorVersion @MINOR_VERSION@ ;
lv2:microVersion @MICRO_VERSION@ ;
lv2:binary <moony@MODULE_SUFFIX@> ;
@UI_WRAP@ui:ui moony:moony_ui ;
@UI_WRAP@@UI_EXT@ui:ui moony:moony_zimple_ui ;
@UI_WRAP@@UI_EXT@ui:ui moony:moony_zimple_kx ;
@UI_OPENGL@ui:ui moony:moony_ui ;
@UI_ZIMPLE@ui:ui moony:moony_zimple_ui ;
@UI_ZIMPLE@ui:ui moony:moony_zimple_kx ;
rdfs:seeAlso <moony.ttl> .
moony:a4xa4
......@@ -86,9 +86,9 @@ moony:a4xa4
lv2:minorVersion @MINOR_VERSION@ ;
lv2:microVersion @MICRO_VERSION@ ;
lv2:binary <moony@MODULE_SUFFIX@> ;
@UI_WRAP@ui:ui moony:moony_ui ;
@UI_WRAP@@UI_EXT@ui:ui moony:moony_zimple_ui ;
@UI_WRAP@@UI_EXT@ui:ui moony:moony_zimple_kx ;
@UI_OPENGL@ui:ui moony:moony_ui ;
@UI_ZIMPLE@ui:ui moony:moony_zimple_ui ;
@UI_ZIMPLE@ui:ui moony:moony_zimple_kx ;
rdfs:seeAlso <moony.ttl> .
# control/atom in, control/atom out
......@@ -97,9 +97,9 @@ moony:c1a1xc1a1
lv2:minorVersion @MINOR_VERSION@ ;
lv2:microVersion @MICRO_VERSION@ ;
lv2:binary <moony@MODULE_SUFFIX@> ;
@UI_WRAP@ui:ui moony:moony_ui ;
@UI_WRAP@@UI_EXT@ui:ui moony:moony_zimple_ui ;
@UI_WRAP@@UI_EXT@ui:ui moony:moony_zimple_kx ;
@UI_OPENGL@ui:ui moony:moony_ui ;
@UI_ZIMPLE@ui:ui moony:moony_zimple_ui ;
@UI_ZIMPLE@ui:ui moony:moony_zimple_kx ;
rdfs:seeAlso <moony.ttl> .
moony:c2a1xc2a1
......@@ -107,9 +107,9 @@ moony:c2a1xc2a1
lv2:minorVersion @MINOR_VERSION@ ;
lv2:microVersion @MICRO_VERSION@ ;
lv2:binary <moony@MODULE_SUFFIX@> ;
@UI_WRAP@ui:ui moony:moony_ui ;
@UI_WRAP@@UI_EXT@ui:ui moony:moony_zimple_ui ;
@UI_WRAP@@UI_EXT@ui:ui moony:moony_zimple_kx ;
@UI_OPENGL@ui:ui moony:moony_ui ;
@UI_ZIMPLE@ui:ui moony:moony_zimple_ui ;
@UI_ZIMPLE@ui:ui moony:moony_zimple_kx ;
rdfs:seeAlso <moony.ttl> .
moony:c4a1xc4a1
......@@ -117,24 +117,24 @@ moony:c4a1xc4a1
lv2:minorVersion @MINOR_VERSION@ ;
lv2:microVersion @MICRO_VERSION@ ;
lv2:binary <moony@MODULE_SUFFIX@> ;
@UI_WRAP@ui:ui moony:moony_ui ;
@UI_WRAP@@UI_EXT@ui:ui moony:moony_zimple_ui ;
@UI_WRAP@@UI_EXT@ui:ui moony:moony_zimple_kx ;
@UI_OPENGL@ui:ui moony:moony_ui ;
@UI_ZIMPLE@ui:ui moony:moony_zimple_ui ;
@UI_ZIMPLE@ui:ui moony:moony_zimple_kx ;
rdfs:seeAlso <moony.ttl> .
# UI
moony:moony_ui
a ui:@UI_TYPE@ ;
ui:binary <moony_ui@MODULE_SUFFIX@> ;
rdfs:seeAlso <moony_ui.ttl> .
moony:moony_zimple_ui
a ui:UI ;
ui:binary <moony_ui@MODULE_SUFFIX@> ;
rdfs:seeAlso <moony_ui.ttl> .
moony:moony_zimple_kx
a kx:Widget ;
ui:binary <moony_ui@MODULE_SUFFIX@> ;
rdfs:seeAlso <moony_ui.ttl> .
@UI@moony:moony_ui
@UI@ a ui:@UI_TYPE@ ;
@UI@ ui:binary <moony_ui@MODULE_SUFFIX@> ;
@UI@ rdfs:seeAlso <moony_ui.ttl> .
@UI@moony:moony_zimple_ui
@UI@ a ui:UI ;
@UI@ ui:binary <moony_ui@MODULE_SUFFIX@> ;
@UI@ rdfs:seeAlso <moony_ui.ttl> .
@UI@moony:moony_zimple_kx
@UI@ a kx:Widget ;
@UI@ ui:binary <moony_ui@MODULE_SUFFIX@> ;
@UI@ rdfs:seeAlso <moony_ui.ttl> .
# Banks
moony:bank-through
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment