Skip to content

Commit

Permalink
Improve handling of dynamic library paths on Mac/Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
speth committed Sep 11, 2022
1 parent 2462fab commit 242a4fe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion SConstruct
Expand Up @@ -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",
Expand Down
7 changes: 6 additions & 1 deletion test/SConscript
Expand Up @@ -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={}):
"""
Expand Down

0 comments on commit 242a4fe

Please sign in to comment.