meson build - mixer - simplify for module build setup
it's still complex anyway... :( but a little smaller
This commit is contained in:
parent
397e21d0de
commit
5e59869a62
|
@ -4,7 +4,6 @@ module_includes = [ '../../..', '../../bin', '../../bin/efx' ]
|
||||||
module_includes2 = [ '../..' , '../bin' , '../bin/efx' ]
|
module_includes2 = [ '../..' , '../bin' , '../bin/efx' ]
|
||||||
module_deps = [ deps_e, dep_dl ]
|
module_deps = [ deps_e, dep_dl ]
|
||||||
|
|
||||||
subdir('mixer')
|
|
||||||
subdir('everything')
|
subdir('everything')
|
||||||
|
|
||||||
mods = [
|
mods = [
|
||||||
|
@ -13,6 +12,7 @@ mods = [
|
||||||
'pager',
|
'pager',
|
||||||
'pager_plain',
|
'pager_plain',
|
||||||
'temperature',
|
'temperature',
|
||||||
|
'mixer',
|
||||||
'notification',
|
'notification',
|
||||||
'ibox',
|
'ibox',
|
||||||
'start',
|
'start',
|
||||||
|
@ -82,9 +82,10 @@ foreach m: mods
|
||||||
disable = false
|
disable = false
|
||||||
cargs = ''
|
cargs = ''
|
||||||
data = []
|
data = []
|
||||||
|
deps = []
|
||||||
|
inc = []
|
||||||
_dir = join_paths(dir_module_e, m)
|
_dir = join_paths(dir_module_e, m)
|
||||||
_dir_bin = join_paths(_dir, module_arch)
|
_dir_bin = join_paths(_dir, module_arch)
|
||||||
_inc = include_directories(module_includes2, join_paths('.', m))
|
|
||||||
|
|
||||||
subdir(m)
|
subdir(m)
|
||||||
|
|
||||||
|
@ -92,6 +93,13 @@ foreach m: mods
|
||||||
|
|
||||||
if get_option(opt) == true and disable == false
|
if get_option(opt) == true and disable == false
|
||||||
|
|
||||||
|
_inc2 = []
|
||||||
|
foreach i: inc
|
||||||
|
_inc2 += join_paths('.', m, i)
|
||||||
|
endforeach
|
||||||
|
_inc = include_directories(module_includes2,
|
||||||
|
join_paths('.', m),
|
||||||
|
_inc2)
|
||||||
_conf = 'USE_MODULE_' + m.underscorify().to_upper()
|
_conf = 'USE_MODULE_' + m.underscorify().to_upper()
|
||||||
module_files += join_paths(_dir_bin, m + '.so')
|
module_files += join_paths(_dir_bin, m + '.so')
|
||||||
|
|
||||||
|
@ -118,7 +126,7 @@ foreach m: mods
|
||||||
shared_module(m, src,
|
shared_module(m, src,
|
||||||
include_directories: _inc,
|
include_directories: _inc,
|
||||||
name_prefix : '',
|
name_prefix : '',
|
||||||
dependencies : module_deps,
|
dependencies : [ module_deps, deps ],
|
||||||
install_dir : _dir_bin,
|
install_dir : _dir_bin,
|
||||||
install : true
|
install : true
|
||||||
)
|
)
|
||||||
|
@ -127,7 +135,7 @@ foreach m: mods
|
||||||
include_directories: _inc,
|
include_directories: _inc,
|
||||||
c_args : cargs,
|
c_args : cargs,
|
||||||
name_prefix : '',
|
name_prefix : '',
|
||||||
dependencies : module_deps,
|
dependencies : [ module_deps, deps ],
|
||||||
install_dir : _dir_bin,
|
install_dir : _dir_bin,
|
||||||
install : true
|
install : true
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,48 +1,46 @@
|
||||||
mixer_dist = [
|
src = files(
|
||||||
'e-module-mixer.edj',
|
|
||||||
'module.desktop',
|
|
||||||
]
|
|
||||||
|
|
||||||
mixer_src = [
|
|
||||||
'e_mod_config.c',
|
|
||||||
'e_mod_main.c',
|
'e_mod_main.c',
|
||||||
|
'e_mod_config.c',
|
||||||
'e_mod_config.h',
|
'e_mod_config.h',
|
||||||
'e_mod_main.h',
|
'e_mod_main.h',
|
||||||
'gadget/mixer.h',
|
'gadget/mixer.h',
|
||||||
'gadget/mixer.c',
|
'gadget/mixer.c',
|
||||||
'gadget/mod.c',
|
'gadget/mod.c'
|
||||||
]
|
)
|
||||||
|
|
||||||
mixer_lib = [
|
mixer_lib = files(
|
||||||
'lib/emix.c',
|
'lib/emix.c',
|
||||||
'lib/emix.h'
|
'lib/emix.h'
|
||||||
]
|
)
|
||||||
|
|
||||||
mixer_dir = join_paths(dir_module_e, 'mixer', module_arch)
|
|
||||||
if get_option('mixer') == true
|
|
||||||
config_h.set('USE_MODULE_MIXER', '1')
|
|
||||||
|
|
||||||
|
if get_option(m) == true
|
||||||
dep_alsa = dependency('alsa', version: '>= 1.0.8', required: false)
|
dep_alsa = dependency('alsa', version: '>= 1.0.8', required: false)
|
||||||
config_h.set('HAVE_ALSA', dep_alsa.found())
|
|
||||||
dep_pulse = dependency('libpulse', required: false)
|
dep_pulse = dependency('libpulse', required: false)
|
||||||
dep_pulse_simple = dependency('libpulse-simple', required: false)
|
dep_pulse_simple = dependency('libpulse-simple', required: false)
|
||||||
|
|
||||||
|
deps = [ dep_alsa, dep_pulse, dep_pulse_simple ]
|
||||||
|
inc = [ 'lib' ]
|
||||||
|
|
||||||
|
config_h.set('HAVE_ALSA' , dep_alsa.found())
|
||||||
config_h.set('HAVE_PULSE', dep_pulse.found() and dep_pulse_simple.found())
|
config_h.set('HAVE_PULSE', dep_pulse.found() and dep_pulse_simple.found())
|
||||||
|
|
||||||
if config_h.get('HAVE_ALSA') == true
|
if config_h.get('HAVE_ALSA') == true
|
||||||
mixer_lib += ['lib/backends/alsa/alsa.c']
|
mixer_lib += files(
|
||||||
|
'lib/backends/alsa/alsa.c'
|
||||||
|
)
|
||||||
endif
|
endif
|
||||||
if config_h.get('HAVE_PULSE') == true
|
if config_h.get('HAVE_PULSE') == true
|
||||||
mixer_lib += [
|
mixer_lib += files(
|
||||||
'lib/backends/pulseaudio/pulse_ml.c',
|
'lib/backends/pulseaudio/pulse_ml.c',
|
||||||
'lib/backends/pulseaudio/pulse.c'
|
'lib/backends/pulseaudio/pulse.c'
|
||||||
]
|
)
|
||||||
endif
|
endif
|
||||||
if config_h.has('HAVE_PULSE') == false and config_h.has('HAVE_ALSA') == false
|
if config_h.has('HAVE_PULSE') == false and config_h.has('HAVE_ALSA') == false
|
||||||
error('mixer support requested, but no backends found!')
|
error('mixer support requested, but no backends found!')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
install_data(mixer_dist,
|
src += mixer_lib
|
||||||
install_dir: join_paths(dir_module_e, 'mixer')
|
|
||||||
)
|
|
||||||
install_data('emixer.desktop',
|
install_data('emixer.desktop',
|
||||||
install_dir: join_paths(dir_data, 'applications')
|
install_dir: join_paths(dir_data, 'applications')
|
||||||
)
|
)
|
||||||
|
@ -50,24 +48,12 @@ if get_option('mixer') == true
|
||||||
install_dir: join_paths(dir_data, 'pixmaps')
|
install_dir: join_paths(dir_data, 'pixmaps')
|
||||||
)
|
)
|
||||||
|
|
||||||
module_files += join_paths(mixer_dir, 'mixer.so')
|
|
||||||
shared_module('mixer',
|
|
||||||
mixer_src, mixer_lib,
|
|
||||||
include_directories: include_directories(module_includes, '.', 'lib'),
|
|
||||||
name_prefix: '',
|
|
||||||
dependencies: [module_deps, dep_alsa, dep_pulse, dep_pulse_simple],
|
|
||||||
install_dir: mixer_dir,
|
|
||||||
install: true
|
|
||||||
)
|
|
||||||
|
|
||||||
executable('emixer',
|
executable('emixer',
|
||||||
[ 'emixer.c', mixer_lib ],
|
[ 'emixer.c', mixer_lib ],
|
||||||
include_directories: include_directories(module_includes, '.', 'lib'),
|
include_directories: include_directories(module_includes, '.', './lib'),
|
||||||
dependencies: [
|
dependencies : [ dep_elementary, deps ],
|
||||||
dep_elementary, dep_alsa, dep_pulse, dep_pulse_simple
|
|
||||||
],
|
|
||||||
c_args : '-DEMIXER_BUILD',
|
c_args : '-DEMIXER_BUILD',
|
||||||
install_dir: dir_bin,
|
install_dir : _dir_bin,
|
||||||
install : true
|
install : true
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in New Issue