meson: error out if platforms contains empty string

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110939
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
This commit is contained in:
Tapani Pälli
2019-06-18 13:50:52 +03:00
parent d94fca5420
commit ff77b0415b

View File

@@ -278,6 +278,10 @@ with_platform_surfaceless = _platforms.contains('surfaceless')
with_platforms = false
if _platforms.length() != 0 and _platforms != ['']
# sanity check that list contains no empty strings
if _platforms.contains('')
error('Invalid argument list given to -Dplatforms, please fix.')
endif
with_platforms = true
egl_native_platform = _platforms[0]
endif