Fix build against static libboost

(cherry-picked from commit c51065e39c)
This commit is contained in:
loonycyborg 2018-04-18 15:36:32 +03:00
parent 2a9c3d621e
commit a0c91ac41e
2 changed files with 3 additions and 2 deletions

View file

@ -370,8 +370,9 @@ if env["prereqs"]:
conf.CheckBoostIostreamsBZip2() & \
conf.CheckBoost("random", require_version = boost_version) & \
conf.CheckBoost("smart_ptr", header_only = True) & \
CheckAsio(conf) & \
conf.CheckBoost("thread") & \
conf.CheckBoost("locale") & \
CheckAsio(conf) & \
conf.CheckBoost("filesystem") \
and Info("Base prerequisites are met")) \
or Warning("Base prerequisites are not met")

View file

@ -78,7 +78,7 @@ def CheckBoost(context, boost_lib, require_version = None, header_only = False):
else:
env.AppendUnique(CPPPATH = [boostdir], LIBPATH = [boostlibdir])
if not header_only:
env.AppendUnique(LIBS = [libname])
env.PrependUnique(LIBS = [libname])
if boost_lib == "thread" and env["PLATFORM"] == "posix":
env.AppendUnique(CCFLAGS = ["-pthread"], LINKFLAGS = ["-pthread"])