meson: Use assert() to validate the prefix

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
This commit is contained in:
Arnaud Rebillout 2018-10-19 17:45:12 +07:00 committed by Arun Raghavan
parent edd9c60984
commit 2fea4c7c01

View File

@ -31,9 +31,7 @@ libversion = '@0@.@1@.0'.format(soversion, pa_version_minor.to_int() * 100 + pa_
# Paths
prefix = get_option('prefix')
if not prefix.startswith('/')
error('Prefix is not absolute: "@0@"'.format(prefix))
endif
assert(prefix.startswith('/'), 'Prefix is not absolute: "@0@"'.format(prefix))
bindir = join_paths(prefix, get_option('bindir'))
libdir = join_paths(prefix, get_option('libdir'))