forked from enlightenment/enlightenment
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_deps = [ deps_e, dep_dl ]
|
||||
|
||||
subdir('mixer')
|
||||
subdir('everything')
|
||||
|
||||
mods = [
|
||||
|
@ -13,6 +12,7 @@ mods = [
|
|||
'pager',
|
||||
'pager_plain',
|
||||
'temperature',
|
||||
'mixer',
|
||||
'notification',
|
||||
'ibox',
|
||||
'start',
|
||||
|
@ -82,9 +82,10 @@ foreach m: mods
|
|||
disable = false
|
||||
cargs = ''
|
||||
data = []
|
||||
deps = []
|
||||
inc = []
|
||||
_dir = join_paths(dir_module_e, m)
|
||||
_dir_bin = join_paths(_dir, module_arch)
|
||||
_inc = include_directories(module_includes2, join_paths('.', m))
|
||||
|
||||
subdir(m)
|
||||
|
||||
|
@ -92,6 +93,13 @@ foreach m: mods
|
|||
|
||||
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()
|
||||
module_files += join_paths(_dir_bin, m + '.so')
|
||||
|
||||
|
@ -118,7 +126,7 @@ foreach m: mods
|
|||
shared_module(m, src,
|
||||
include_directories: _inc,
|
||||
name_prefix : '',
|
||||
dependencies : module_deps,
|
||||
dependencies : [ module_deps, deps ],
|
||||
install_dir : _dir_bin,
|
||||
install : true
|
||||
)
|
||||
|
@ -127,7 +135,7 @@ foreach m: mods
|
|||
include_directories: _inc,
|
||||
c_args : cargs,
|
||||
name_prefix : '',
|
||||
dependencies : module_deps,
|
||||
dependencies : [ module_deps, deps ],
|
||||
install_dir : _dir_bin,
|
||||
install : true
|
||||
)
|
||||
|
|
|
@ -1,48 +1,46 @@
|
|||
mixer_dist = [
|
||||
'e-module-mixer.edj',
|
||||
'module.desktop',
|
||||
]
|
||||
|
||||
mixer_src = [
|
||||
'e_mod_config.c',
|
||||
src = files(
|
||||
'e_mod_main.c',
|
||||
'e_mod_config.c',
|
||||
'e_mod_config.h',
|
||||
'e_mod_main.h',
|
||||
'gadget/mixer.h',
|
||||
'gadget/mixer.c',
|
||||
'gadget/mod.c',
|
||||
]
|
||||
'gadget/mod.c'
|
||||
)
|
||||
|
||||
mixer_lib = [
|
||||
mixer_lib = files(
|
||||
'lib/emix.c',
|
||||
'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)
|
||||
config_h.set('HAVE_ALSA', dep_alsa.found())
|
||||
dep_pulse = dependency('libpulse', 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())
|
||||
|
||||
if config_h.get('HAVE_ALSA') == true
|
||||
mixer_lib += ['lib/backends/alsa/alsa.c']
|
||||
mixer_lib += files(
|
||||
'lib/backends/alsa/alsa.c'
|
||||
)
|
||||
endif
|
||||
if config_h.get('HAVE_PULSE') == true
|
||||
mixer_lib += [
|
||||
mixer_lib += files(
|
||||
'lib/backends/pulseaudio/pulse_ml.c',
|
||||
'lib/backends/pulseaudio/pulse.c'
|
||||
]
|
||||
)
|
||||
endif
|
||||
if config_h.has('HAVE_PULSE') == false and config_h.has('HAVE_ALSA') == false
|
||||
error('mixer support requested, but no backends found!')
|
||||
endif
|
||||
|
||||
install_data(mixer_dist,
|
||||
install_dir: join_paths(dir_module_e, 'mixer')
|
||||
)
|
||||
src += mixer_lib
|
||||
|
||||
install_data('emixer.desktop',
|
||||
install_dir: join_paths(dir_data, 'applications')
|
||||
)
|
||||
|
@ -50,24 +48,12 @@ if get_option('mixer') == true
|
|||
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',
|
||||
[ 'emixer.c', mixer_lib ],
|
||||
include_directories: include_directories(module_includes, '.', 'lib'),
|
||||
dependencies: [
|
||||
dep_elementary, dep_alsa, dep_pulse, dep_pulse_simple
|
||||
],
|
||||
include_directories: include_directories(module_includes, '.', './lib'),
|
||||
dependencies : [ dep_elementary, deps ],
|
||||
c_args : '-DEMIXER_BUILD',
|
||||
install_dir: dir_bin,
|
||||
install_dir : _dir_bin,
|
||||
install : true
|
||||
)
|
||||
endif
|
||||
|
|
Loading…
Reference in New Issue