mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-30 01:47:13 +00:00
Better boostlibs check;...
...will find -mt libraries if the plain ones are not available.
This commit is contained in:
parent
fb637cab77
commit
22ea8f704a
16
SConstruct
16
SConstruct
@ -99,15 +99,15 @@ def restore_env(env, backup):
|
|||||||
|
|
||||||
def CheckBoostLib(context, boost_lib, require_version = None):
|
def CheckBoostLib(context, boost_lib, require_version = None):
|
||||||
env = context.env
|
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"])
|
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")
|
header_name = boost_headers.get(boost_lib, boost_lib + ".hpp")
|
||||||
libname = "boost_" + boost_lib + env.get("BOOST_SUFFIX", "")
|
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])
|
env.AppendUnique(LIBS = [libname])
|
||||||
|
|
||||||
test_program = """
|
test_program = """
|
||||||
@ -264,12 +264,18 @@ conf = Configure(env, custom_tests = { 'CheckPKGConfig' : CheckPKGConfig,
|
|||||||
'CheckPKG' : CheckPKG,
|
'CheckPKG' : CheckPKG,
|
||||||
'CheckSDL' : CheckSDL,
|
'CheckSDL' : CheckSDL,
|
||||||
'CheckOgg' : CheckOgg,
|
'CheckOgg' : CheckOgg,
|
||||||
'CheckPNG' : CheckPNG, })
|
'CheckPNG' : CheckPNG,
|
||||||
|
'CheckBoost' : CheckBoost })
|
||||||
|
|
||||||
if not conf.CheckPKGConfig('0.15.0'):
|
if not conf.CheckPKGConfig('0.15.0'):
|
||||||
print 'pkg-config >= 0.15.0 not found.'
|
print 'pkg-config >= 0.15.0 not found.'
|
||||||
Exit(1)
|
Exit(1)
|
||||||
|
|
||||||
|
env["BOOSTLIBS"] = "/usr/lib"
|
||||||
|
if not conf.CheckBoost("iostreams"):
|
||||||
|
print 'boost_iostreams not found.'
|
||||||
|
Exit(1)
|
||||||
|
|
||||||
targets = sets.Set(COMMAND_LINE_TARGETS)
|
targets = sets.Set(COMMAND_LINE_TARGETS)
|
||||||
if not targets or (sets.Set(['all', 'wesnoth', 'wesnoth_editor']) & targets):
|
if not targets or (sets.Set(['all', 'wesnoth', 'wesnoth_editor']) & targets):
|
||||||
if not conf.CheckSDL(require_version = '1.2.7'):
|
if not conf.CheckSDL(require_version = '1.2.7'):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user