Show version of glew when version 2 not found

This commit is contained in:
Kovid Goyal 2017-01-07 22:09:12 +05:30
parent e8bbf3fe4f
commit 46169ace1c

View File

@ -67,7 +67,11 @@ def init_env(debug=False, asan=False):
cflags.append('-pthread')
if subprocess.Popen('pkg-config --atleast-version=2 glew'.split()).wait() != 0:
raise SystemExit('glew >= 2.0.0 is required')
try:
ver = subprocess.check_output('pkg-config --modversion glew'.split()).decode('utf-8').strip()
except Exception:
ver = 'not found'
raise SystemExit('glew >= 2.0.0 is required, found version: ' + ver)
cflags.extend(pkg_config('glew', '--cflags-only-I'))
cflags.extend(pkg_config('freetype2', '--cflags-only-I'))
cflags.extend(pkg_config('glfw3', '--cflags-only-I'))