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...
This commit is contained in:
@@ -29,6 +29,7 @@ from SCons.Script.SConscript import SConsEnvironment
|
|||||||
import SCons.Action
|
import SCons.Action
|
||||||
import SCons.Util
|
import SCons.Util
|
||||||
import SCons.Builder
|
import SCons.Builder
|
||||||
|
import SCons.Subst
|
||||||
import SCons.Tool
|
import SCons.Tool
|
||||||
import bcolors
|
import bcolors
|
||||||
bc = bcolors.bcolors()
|
bc = bcolors.bcolors()
|
||||||
@@ -234,10 +235,6 @@ def setup_staticlibs(lenv):
|
|||||||
if lenv['WITH_BF_STATICLLVM']:
|
if lenv['WITH_BF_STATICLLVM']:
|
||||||
statlibs += Split(lenv['BF_LLVM_LIB_STATIC'])
|
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']:
|
if lenv['WITH_BF_JEMALLOC']:
|
||||||
libincs += Split(lenv['BF_JEMALLOC_LIBPATH'])
|
libincs += Split(lenv['BF_JEMALLOC_LIBPATH'])
|
||||||
if lenv['WITH_BF_STATICJEMALLOC']:
|
if lenv['WITH_BF_STATICJEMALLOC']:
|
||||||
@@ -249,6 +246,12 @@ def setup_staticlibs(lenv):
|
|||||||
if lenv['WITH_BF_STATIC3DMOUSE']:
|
if lenv['WITH_BF_STATIC3DMOUSE']:
|
||||||
statlibs += Split(lenv['BF_3DMOUSE_LIB_STATIC'])
|
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
|
return statlibs, libincs
|
||||||
|
|
||||||
def setup_syslibs(lenv):
|
def setup_syslibs(lenv):
|
||||||
|
Reference in New Issue
Block a user