diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2013-01-31 16:24:12 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2013-01-31 16:24:12 +0400 |
commit | ad76a8a10c22e251c9d22dc20cdc9613e0c785e8 (patch) | |
tree | ad98c2b5cdb4da1e3bcc7e92b98fc999f7d06814 /build_files | |
parent | 9c99bcd3685cc49768502074b8a7ba9572d2dbc4 (diff) |
Fix scons building under unix. Now we should really have only *one* '/usr/lib' lib search path, in last position! Previously we could have a bunch of those, even in first position, which would e.g. prevent linking against a custom boost in /opt/lib/boost if you had a system boost installed...
Diffstat (limited to 'build_files')
-rw-r--r-- | build_files/scons/tools/Blender.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py index 94a9f1d9c24..3688a829a4d 100644 --- a/build_files/scons/tools/Blender.py +++ b/build_files/scons/tools/Blender.py @@ -29,6 +29,7 @@ from SCons.Script.SConscript import SConsEnvironment import SCons.Action import SCons.Util import SCons.Builder +import SCons.Subst import SCons.Tool import bcolors bc = bcolors.bcolors() @@ -234,10 +235,6 @@ def setup_staticlibs(lenv): if lenv['WITH_BF_STATICLLVM']: statlibs += Split(lenv['BF_LLVM_LIB_STATIC']) - # setting this last so any overriding of manually libs could be handled - if lenv['OURPLATFORM'] not in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross', 'win64-mingw'): - libincs.append('/usr/lib') - if lenv['WITH_BF_JEMALLOC']: libincs += Split(lenv['BF_JEMALLOC_LIBPATH']) if lenv['WITH_BF_STATICJEMALLOC']: @@ -249,6 +246,12 @@ def setup_staticlibs(lenv): if lenv['WITH_BF_STATIC3DMOUSE']: statlibs += Split(lenv['BF_3DMOUSE_LIB_STATIC']) + # setting this last so any overriding of manually libs could be handled + if lenv['OURPLATFORM'] not in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross', 'win64-mingw'): + # We must remove any previous items defining this path, for same reason stated above! + libincs = [e for e in libincs if SCons.Subst.scons_subst(e, lenv, gvars=lenv.Dictionary()) != "/usr/lib"] + libincs.append('/usr/lib') + return statlibs, libincs def setup_syslibs(lenv): |