Improve handling of dynamic library paths on Mac/Windows

This commit is contained in:
Ray Speth
2022-09-11 10:59:30 -04:00
committed by Ray Speth
parent 2462fab75b
commit 242a4fef1e
2 changed files with 7 additions and 2 deletions
+1 -1
View File
@@ -415,7 +415,7 @@ config_options = [
"""Environment variables to propagate through to SCons. Either the
string 'all' or a comma separated list of variable names, for example,
'LD_LIBRARY_PATH,HOME'.""",
"PATH,LD_LIBRARY_PATH,PYTHONPATH"),
"PATH,LD_LIBRARY_PATH,DYLD_LIBRARY_PATH,PYTHONPATH"),
BoolOption(
"use_pch",
"Use a precompiled-header to speed up compilation",
+6 -1
View File
@@ -45,7 +45,12 @@ localenv.PrependENVPath('PYTHONPATH', Dir('#test/python').abspath)
PASSED_FILES = {}
# Add build/lib in order to find Cantera shared library
localenv.PrependENVPath('LD_LIBRARY_PATH', Dir('#build/lib').abspath)
if env["OS"] == "Windows":
localenv.PrependENVPath('PATH', Dir('#build/lib').abspath)
elif env['OS'] == 'Darwin':
localenv.PrependENVPath('DYLD_LIBRARY_PATH', Dir('#build/lib').abspath)
else:
localenv.PrependENVPath('LD_LIBRARY_PATH', Dir('#build/lib').abspath)
def addTestProgram(subdir, progName, env_vars={}):
"""