2017-08-11 21:10:52 -07:00
|
|
|
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'
|
|
|
|
)
|
2017-07-21 13:20:03 -07:00
|
|
|
|
2017-08-11 21:10:52 -07:00
|
|
|
mixer_lib = files(
|
|
|
|
'lib/emix.c',
|
|
|
|
'lib/emix.h'
|
|
|
|
)
|
2017-07-21 13:20:03 -07:00
|
|
|
|
2017-08-11 21:10:52 -07:00
|
|
|
if get_option(m) == true
|
|
|
|
dep_alsa = dependency('alsa', version: '>= 1.0.8', required: false)
|
|
|
|
dep_pulse = dependency('libpulse', required: false)
|
|
|
|
dep_pulse_simple = dependency('libpulse-simple', required: false)
|
2017-07-21 13:20:03 -07:00
|
|
|
|
2017-08-11 21:10:52 -07:00
|
|
|
deps = [ dep_alsa, dep_pulse, dep_pulse_simple ]
|
|
|
|
inc = [ 'lib' ]
|
2017-07-21 13:20:03 -07:00
|
|
|
|
2017-08-11 21:10:52 -07:00
|
|
|
config_h.set('HAVE_ALSA' , dep_alsa.found())
|
|
|
|
config_h.set('HAVE_PULSE', dep_pulse.found() and dep_pulse_simple.found())
|
2017-07-21 13:20:03 -07:00
|
|
|
|
2017-08-11 21:10:52 -07:00
|
|
|
if config_h.get('HAVE_ALSA') == true
|
|
|
|
mixer_lib += files(
|
|
|
|
'lib/backends/alsa/alsa.c'
|
|
|
|
)
|
|
|
|
endif
|
|
|
|
if config_h.get('HAVE_PULSE') == true
|
|
|
|
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
|
2017-07-21 13:20:03 -07:00
|
|
|
|
2017-08-11 21:10:52 -07:00
|
|
|
src += mixer_lib
|
2017-07-21 13:20:03 -07:00
|
|
|
|
2017-08-11 21:10:52 -07:00
|
|
|
install_data('emixer.desktop',
|
|
|
|
install_dir: join_paths(dir_data, 'applications')
|
|
|
|
)
|
|
|
|
install_data('emixer.png',
|
|
|
|
install_dir: join_paths(dir_data, 'pixmaps')
|
|
|
|
)
|
|
|
|
|
|
|
|
executable('emixer',
|
|
|
|
[ 'emixer.c', mixer_lib ],
|
|
|
|
include_directories: include_directories(module_includes, '.', './lib'),
|
|
|
|
dependencies : [ dep_elementary, deps ],
|
|
|
|
c_args : '-DEMIXER_BUILD',
|
|
|
|
install_dir : _dir_bin,
|
|
|
|
install : true
|
|
|
|
)
|
2017-07-21 13:20:03 -07:00
|
|
|
endif
|