devenv: Do not prepend empty list to PATH and LD_LIBRARY_PATH

pull/10047/head
Xavier Claessens 3 years ago committed by Xavier Claessens
parent 24f224777d
commit ac4f8d0088
  1. 16
      mesonbuild/backend/backends.py

@ -1834,11 +1834,13 @@ class Backend:
# LD_LIBRARY_PATH. This allows running system applications using
# that library.
library_paths.add(tdir)
if mesonlib.is_windows() or mesonlib.is_cygwin():
extra_paths.update(library_paths)
elif mesonlib.is_osx():
env.prepend('DYLD_LIBRARY_PATH', list(library_paths))
else:
env.prepend('LD_LIBRARY_PATH', list(library_paths))
env.prepend('PATH', list(extra_paths))
if library_paths:
if mesonlib.is_windows() or mesonlib.is_cygwin():
extra_paths.update(library_paths)
elif mesonlib.is_osx():
env.prepend('DYLD_LIBRARY_PATH', list(library_paths))
else:
env.prepend('LD_LIBRARY_PATH', list(library_paths))
if extra_paths:
env.prepend('PATH', list(extra_paths))
return env

Loading…
Cancel
Save