Better boostlibs check;...
...will find -mt libraries if the plain ones are not available.
This commit is contained in:
parent
fb637cab77
commit
22ea8f704a
1 changed files with 11 additions and 5 deletions
16
SConstruct
16
SConstruct
|
@ -99,15 +99,15 @@ def restore_env(env, backup):
|
|||
|
||||
def CheckBoostLib(context, boost_lib, require_version = None):
|
||||
env = context.env
|
||||
boostdir = context.env.get("BOOSTDIR", "/usr/include/boost"))
|
||||
boostdir = context.env.get("BOOSTDIR", "/usr/include")
|
||||
backup = backup_env(env, ["CPPPATH", "LIBPATH", "LIBS"])
|
||||
env.AppendUnique(CPPPATH = [boostdir], LIBS = [env["BOOSTLIBS"]])
|
||||
|
||||
boost_headers = { "regex" : "regex/config.hpp" }
|
||||
boost_headers = { "regex" : "regex/config.hpp",
|
||||
"iostreams" : "iostreams/stream.hpp" }
|
||||
header_name = boost_headers.get(boost_lib, boost_lib + ".hpp")
|
||||
libname = "boost_" + boost_lib + env.get("BOOST_SUFFIX", "")
|
||||
|
||||
env.AppendUnique(CPPPATH = [boostdir], LIBS = [env["BOOSTLIBS"]])
|
||||
env.AppendUnique(CPPPATH = [boostdir], LIBPATH = [env["BOOSTLIBS"]])
|
||||
env.AppendUnique(LIBS = [libname])
|
||||
|
||||
test_program = """
|
||||
|
@ -264,12 +264,18 @@ conf = Configure(env, custom_tests = { 'CheckPKGConfig' : CheckPKGConfig,
|
|||
'CheckPKG' : CheckPKG,
|
||||
'CheckSDL' : CheckSDL,
|
||||
'CheckOgg' : CheckOgg,
|
||||
'CheckPNG' : CheckPNG, })
|
||||
'CheckPNG' : CheckPNG,
|
||||
'CheckBoost' : CheckBoost })
|
||||
|
||||
if not conf.CheckPKGConfig('0.15.0'):
|
||||
print 'pkg-config >= 0.15.0 not found.'
|
||||
Exit(1)
|
||||
|
||||
env["BOOSTLIBS"] = "/usr/lib"
|
||||
if not conf.CheckBoost("iostreams"):
|
||||
print 'boost_iostreams not found.'
|
||||
Exit(1)
|
||||
|
||||
targets = sets.Set(COMMAND_LINE_TARGETS)
|
||||
if not targets or (sets.Set(['all', 'wesnoth', 'wesnoth_editor']) & targets):
|
||||
if not conf.CheckSDL(require_version = '1.2.7'):
|
||||
|
|
Loading…
Add table
Reference in a new issue