diff --git a/examples/site_scons/site_init.py b/examples/site_scons/site_init.py index dffa6a21..a95334d7 100644 --- a/examples/site_scons/site_init.py +++ b/examples/site_scons/site_init.py @@ -1,32 +1,32 @@ from SCons.Script import * from os.path import * def tamaas(env): """Sets correct environement variables for Tamaas. - 'TAMAAS_PATH' is list of potential tamaas repositories - 'TAMAAS_BUILD_TYPE' is the build type of tamaas (release, debug, profiling)""" if env.GetOption("clean"): return build_type = "release" if 'TAMAAS_BUILD_TYPE' in env: build_type = env['TAMAAS_BUILD_TYPE'] path = findPath(env['TAMAAS_PATH'], build_type) if not path: print "Tamaas ({}) not found in {}".format(build_type, env['TAMAAS_PATH']) Exit(1) - env.AppendUnique(CPPPATH = [join(path, 'src')]) - env.AppendUnique(LIBPATH = [join(path, 'build-{}/src'.format(build_type))]) - env.AppendUnique(RPATH = [join(path, 'build-{}/src'.format(build_type))]) + env.AppendUnique(CPPPATH = [abspath(join(path, 'src'))]) + env.AppendUnique(LIBPATH = [abspath(join(path, 'build-{}/src'.format(build_type)))]) + env.AppendUnique(RPATH = [abspath(join(path, 'build-{}/src'.format(build_type)))]) def findPath(search, build_type): trial = Environment() conf = Configure(trial) for path in search: trial['CPPPATH'] = join(path, 'src') trial['LIBPATH'] = join(path, 'build-{}/src'.format(build_type)) trial['RPATH'] = join(path, 'build-{}/src'.format(build_type)) if conf.CheckLib("Tamaas", language="CXX"): return path