forked from mia/Aegisub
meson: don't check disabled dependencies at all
Don't search for the dependency and set up fallback only to throw it away if the option is disabled. This is a waste, and this gives the user the illusion that the request to disable the feature was ignored.
This commit is contained in:
parent
e58e4a9149
commit
18503946d5
|
@ -193,6 +193,8 @@ foreach dep: [
|
|||
['hunspell', '', 'Hunspell', ['hunspell', 'hunspell_dep']],
|
||||
['uchardet', '', 'uchardet', ['uchardet', 'uchardet_dep']],
|
||||
]
|
||||
optname = dep[0].split('-')[0]
|
||||
if not get_option(optname).disabled()
|
||||
dep_version = dep[1] != '' ? dep[1] : '>=0'
|
||||
# [provide] section is ignored if required is false;
|
||||
# must provided define fallback explicitly
|
||||
|
@ -205,14 +207,14 @@ foreach dep: [
|
|||
d = dependency(dep[0], version: dep_version, required: false)
|
||||
endif
|
||||
|
||||
optname = dep[0].split('-')[0]
|
||||
if d.found() and not get_option(optname).disabled()
|
||||
if d.found()
|
||||
deps += d
|
||||
conf.set('WITH_@0@'.format(dep[0].split('-')[0].to_upper()), 1)
|
||||
dep_avail += dep[2]
|
||||
elif get_option(optname).enabled()
|
||||
error('@0@ enabled but not found'.format(dep[2]))
|
||||
endif
|
||||
endif
|
||||
endforeach
|
||||
|
||||
if host_machine.system() == 'windows' and get_option('avisynth').enabled()
|
||||
|
|
Loading…
Reference in New Issue