meson: rename option for optional dependencies

This commit is contained in:
Ryan Lucia 2019-02-09 18:28:32 -05:00 committed by line0
parent 0ab47f2b8d
commit 3ca8193ad0
2 changed files with 10 additions and 10 deletions

View File

@ -67,11 +67,11 @@ foreach dep: [
required: false)
optname = 'enable_@0@'.format(dep[0].split('-')[0])
if d.found() and get_option(optname) != 'disabled'
if d.found() and not get_option(optname).disabled()
deps += d
conf.set('WITH_@0@'.format(dep[0].split('-')[0].to_upper()), '1')
dep_avail += dep[2]
elif get_option(optname) == 'enabled'
elif get_option(optname).enabled()
error('@0@ enabled but not found'.format(dep[2]))
endif
endforeach

View File

@ -1,14 +1,14 @@
option('enable_alsa', type: 'feature', description: 'ALSA audio output')
option('enable_openal', type: 'feature', description: 'OpenAL audio output')
option('enable_libpulse', type: 'feature', description: 'PulseAudio audio output')
option('enable_portaudio', type: 'feature', description: 'PortAudio audio output')
option('alsa', type: 'feature', description: 'ALSA audio output')
option('openal', type: 'feature', description: 'OpenAL audio output')
option('libpulse', type: 'feature', description: 'PulseAudio audio output')
option('portaudio', type: 'feature', description: 'PortAudio audio output')
option('default_audio_output', type: 'combo', choices: ['auto', 'ALSA', 'OpenAL', 'PulseAudio', 'PortAudio'], description: 'Default audio output')
option('enable_ffms2', type: 'feature', description: 'FFMS2 video source')
option('ffms2', type: 'feature', description: 'FFMS2 video source')
option('enable_fftw3', type: 'feature', description: 'FFTW3 support')
option('enable_hunspell', type: 'feature', description: 'Hunspell spell checker')
option('enable_uchardet', type: 'feature', description: 'uchardet character encoding detection')
option('fftw3', type: 'feature', description: 'FFTW3 support')
option('hunspell', type: 'feature', description: 'Hunspell spell checker')
option('uchardet', type: 'feature', description: 'uchardet character encoding detection')
option('system_luajit', type: 'boolean', value: false, description: 'Force using system luajit')