2017-07-21 13:20:03 -07:00
|
|
|
mixer_dist = [
|
|
|
|
'e-module-mixer.edj',
|
|
|
|
'module.desktop',
|
|
|
|
]
|
|
|
|
|
|
|
|
mixer_src = [
|
|
|
|
'e_mod_config.c',
|
|
|
|
'e_mod_main.c',
|
|
|
|
'e_mod_config.h',
|
|
|
|
'e_mod_main.h',
|
|
|
|
'gadget/mixer.h',
|
|
|
|
'gadget/mixer.c',
|
|
|
|
'gadget/mod.c',
|
|
|
|
]
|
|
|
|
|
|
|
|
mixer_lib = [
|
|
|
|
'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')
|
|
|
|
|
|
|
|
dep_alsa = dependency('alsa', version: '>= 1.0.8', required: false)
|
2017-07-22 00:53:31 -07:00
|
|
|
config_h.set('HAVE_ALSA', dep_alsa.found())
|
2017-07-21 13:20:03 -07:00
|
|
|
dep_pulse = dependency('libpulse', required: false)
|
|
|
|
dep_pulse_simple = dependency('libpulse-simple', required: false)
|
2017-07-22 00:53:31 -07:00
|
|
|
config_h.set('HAVE_PULSE', dep_pulse.found() and dep_pulse_simple.found())
|
|
|
|
if config_h.get('HAVE_ALSA') == true
|
2017-07-21 13:20:03 -07:00
|
|
|
mixer_lib += ['lib/backends/alsa/alsa.c']
|
|
|
|
endif
|
2017-07-22 00:53:31 -07:00
|
|
|
if config_h.get('HAVE_PULSE') == true
|
2017-07-21 13:20:03 -07:00
|
|
|
mixer_lib += [
|
|
|
|
'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')
|
|
|
|
)
|
|
|
|
install_data('emixer.desktop',
|
|
|
|
install_dir: join_paths(dir_data, 'applications')
|
|
|
|
)
|
|
|
|
install_data('emixer.png',
|
|
|
|
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
|
|
|
|
],
|
|
|
|
c_args: '-DEMIXER_BUILD',
|
|
|
|
install_dir: dir_bin,
|
|
|
|
install: true
|
|
|
|
)
|
|
|
|
endif
|