summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordknn <yoann.blein@free.fr>2012-07-09 11:57:44 (GMT)
committerdknn <yoann.blein@free.fr>2012-09-22 09:00:01 (GMT)
commit68c8467913451099154b28d5a876ae14c1a9e1dd (patch)
tree50fdc9ff78f95fc783c1ac80b0a510426202ae38 /BuildTools/SCons
parent88822191fbc4deaad178a969e06f9527082e02d2 (diff)
downloadswift-contrib-68c8467913451099154b28d5a876ae14c1a9e1dd.zip
swift-contrib-68c8467913451099154b28d5a876ae14c1a9e1dd.tar.bz2
Fix linking errors + add libvpx
Diffstat (limited to 'BuildTools/SCons')
-rw-r--r--BuildTools/SCons/SConscript.boot3
-rw-r--r--BuildTools/SCons/SConstruct18
2 files changed, 21 insertions, 0 deletions
diff --git a/BuildTools/SCons/SConscript.boot b/BuildTools/SCons/SConscript.boot
index 58f6adc..c4b5168 100644
--- a/BuildTools/SCons/SConscript.boot
+++ b/BuildTools/SCons/SConscript.boot
@@ -62,6 +62,9 @@ vars.Add(BoolVariable("set_iterator_debug_level", "Set _ITERATOR_DEBUG_LEVEL=0",
vars.Add(PathVariable("jrtplib_includedir", "JRTPLIB headers location", None, PathVariable.PathAccept))
vars.Add(PathVariable("jrtplib_libdir", "JRTPLIB library location", None, PathVariable.PathAccept))
vars.Add("jrtplib_libname", "JRTPLIB library name", "libjrtp" if os.name == "nt" else "jrtp")
+vars.Add(PathVariable("libvpx_includedir", "libvpx headers location", None, PathVariable.PathAccept))
+vars.Add(PathVariable("libvpx_libdir", "libvpx library location", None, PathVariable.PathAccept))
+vars.Add("libvpx_libname", "libvpx library name", "libvpx" if os.name == "nt" else "vpx")
################################################################################
# Set up default build & configure environment
diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct
index 6919ba1..daaa98d 100644
--- a/BuildTools/SCons/SConstruct
+++ b/BuildTools/SCons/SConstruct
@@ -499,6 +499,24 @@ if env["experimental"] :
#else :
#env["JRTPLIB_FLAGS"] = {}
+# libvpx
+if env["experimental"] :
+ libvpx_conf_env = conf_env.Clone()
+ libvpx_flags = {}
+ if env.get("libvpx_libdir", None) :
+ libvpx_flags["LIBPATH"] = [env["libvpx_libdir"]]
+ if env.get("libvpx_includedir", None) :
+ libvpx_flags["CPPATH"] = [env["libvpx_includedir"]]
+ libvpx_conf_env.MergeFlags(libvpx_flags)
+ conf = Configure(libvpx_conf_env)
+
+ if conf.CheckLibWithHeader(env["libvpx_libname"], "vpx/vpx_codec.h", language='C') :
+ env["HAVE_LIBVPX"] = 1
+ env["LIBVPX_FLAGS"] = { "LIBS": [env["libvpx_libname"]] }
+ env["LIBVPX_FLAGS"].update(libvpx_flags)
+ conf.Finish()
+
+
################################################################################
# DocBook setup
################################################################################