1src = files( 2 'e_mod_main.c', 3 'e_mod_config.c', 4 'e_mod_config.h', 5 'e_mod_main.h', 6 'gadget/mixer.h', 7 'gadget/mixer.c', 8 'gadget/mod.c', 9 'gadget/backend.c' 10 ) 11 12mixer_lib = files( 13 'lib/emix.c', 14 'lib/emix.h' 15 ) 16 17if get_option(m) == true 18 dep_alsa = dependency('alsa', version: '>= 1.0.8', required: false) 19 dep_pulse = dependency('libpulse', required: false) 20 dep_pulse_simple = dependency('libpulse-simple', required: false) 21 22 deps += [ dep_alsa, dep_pulse, dep_pulse_simple ] 23 inc = [ 'lib' ] 24 25 config_h.set('HAVE_ALSA' , dep_alsa.found()) 26 config_h.set('HAVE_PULSE', dep_pulse.found() and dep_pulse_simple.found()) 27 28 if config_h.get('HAVE_ALSA') == true 29 mixer_lib += files( 30 'lib/backends/alsa/alsa.c' 31 ) 32 endif 33 if config_h.get('HAVE_PULSE') == true 34 mixer_lib += files( 35 'lib/backends/pulseaudio/pulse_ml.c', 36 'lib/backends/pulseaudio/pulse.c' 37 ) 38 endif 39 if config_h.has('HAVE_PULSE') == false and config_h.has('HAVE_ALSA') == false 40 error('mixer support requested, but no backends found!') 41 endif 42 43 src += mixer_lib 44 45 install_data('emixer.desktop', 46 install_dir: join_paths(dir_data, 'applications') 47 ) 48 install_data('emixer.png', 49 install_dir: join_paths(dir_data, 'icons/hicolor/128x128/apps') 50 ) 51 52 executable('emixer', 53 [ 'emixer.c', mixer_lib ], 54 include_directories: include_directories(module_includes, '.', './lib'), 55 dependencies : [ dep_elementary, deps ], 56 c_args : '-DEMIXER_BUILD', 57 install_dir : dir_bin, 58 install : true 59 ) 60endif 61