Warn when OSMesa library path cannot be set

This commit is contained in:
Ravi Shankar 2016-12-15 12:40:37 +05:30
parent 4d165dbf36
commit 000d46490e
2 changed files with 12 additions and 9 deletions

View file

@ -734,8 +734,9 @@ class MachCommands(CommandBase):
# On Linux and mac, find the OSMesa software rendering library and
# add it to the dynamic linker search path.
try:
args = [self.get_binary_path(use_release, not use_release)]
set_osmesa_env(args[0], os.environ)
bin_path = self.get_binary_path(use_release, not use_release)
if not set_osmesa_env(bin_path, os.environ):
print("Warning: Cannot set the path to OSMesa library.")
except BuildNotFound:
# This can occur when cross compiling (e.g. arm64), in which case
# we won't run the tests anyway so can safely ignore this step.