[SCons] Consolidate addition of build/lib to search path

This commit is contained in:
Ray Speth
2023-02-02 18:33:16 -06:00
committed by Ingmar Schoegl
parent 360e85b163
commit 1c5595e16c
4 changed files with 9 additions and 24 deletions
+9 -1
View File
@@ -2196,7 +2196,15 @@ def install(*args, **kwargs):
env.SConsignFile()
env.Prepend(CPPPATH=[],
LIBPATH=[Dir('build/lib')])
LIBPATH=[Dir('build/lib')])
# Add build/lib to library search path in order to find Cantera shared library
if env['OS'] == 'Windows':
env.PrependENVPath('PATH', Dir('#build/lib').abspath)
elif env['OS'] == 'Darwin':
env.PrependENVPath('DYLD_LIBRARY_PATH', Dir('#build/lib').abspath)
else:
env.PrependENVPath('LD_LIBRARY_PATH', Dir('#build/lib').abspath)
for yaml in multi_glob(env, "data", "yaml"):
dest = Path() / "build" / "data" / yaml.name
-6
View File
@@ -8,12 +8,6 @@ Import('env', 'build', 'install')
localenv = env.Clone()
# Add build/lib in order to find Cantera shared library
if env['OS'] == 'Darwin':
localenv.PrependENVPath('DYLD_LIBRARY_PATH', Dir('#build/lib').abspath)
else:
localenv.PrependENVPath('LD_LIBRARY_PATH', Dir('#build/lib').abspath)
Page = namedtuple('Page', ['name', 'title', 'objects'])
-8
View File
@@ -37,14 +37,6 @@ localenv.PrependENVPath('PYTHONPATH', Dir('#test/python').abspath)
PASSED_FILES = {}
# Add build/lib in order to find Cantera shared library
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={}):
"""
Compile a test program and create a targets for running
-9
View File
@@ -18,15 +18,6 @@ localenv['ENV']['CANTERA_DATA'] = (Dir('#build/data').abspath + os.pathsep +
Dir('#samples/data').abspath + os.pathsep +
Dir('#test/data').abspath)
# Add build/lib in order to find Cantera shared library
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)
PASSED_FILES = {}