From 96d693d51973bd5b2ed47755c8726dc2076f6c53 Mon Sep 17 00:00:00 2001 From: dknn Date: Sat, 7 Jul 2012 12:03:26 +0200 Subject: Add system library jrtplib in SCons diff --git a/BuildTools/SCons/SConscript.boot b/BuildTools/SCons/SConscript.boot index a5474bf..58f6adc 100644 --- a/BuildTools/SCons/SConscript.boot +++ b/BuildTools/SCons/SConscript.boot @@ -59,6 +59,9 @@ vars.Add(BoolVariable("build_examples", "Build example programs", "yes")) vars.Add(BoolVariable("enable_variants", "Build in a separate dir under build/, depending on compile flags", "no")) vars.Add(BoolVariable("experimental", "Build experimental features", "no")) vars.Add(BoolVariable("set_iterator_debug_level", "Set _ITERATOR_DEBUG_LEVEL=0", "yes")) +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") ################################################################################ # Set up default build & configure environment diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct index 2e8d1cb..6919ba1 100644 --- a/BuildTools/SCons/SConstruct +++ b/BuildTools/SCons/SConstruct @@ -478,6 +478,27 @@ try : except : env["HAVE_QT"] = False +# JRTPLIB +if env["experimental"] : + jrtplib_conf_env = conf_env.Clone() + jrtplib_flags = {} + if env.get("jrtplib_libdir", None) : + jrtplib_flags["LIBPATH"] = [env["jrtplib_libdir"]] + if env.get("jrtplib_includedir", None) and env.get("jrtplib_libdir", None) : + jrtplib_flags["CPPPATH"] = [env["jrtplib_includedir"], env["jrtplib_libdir"]] + jrtplib_conf_env.MergeFlags(jrtplib_flags) + conf = Configure(jrtplib_conf_env) + + if conf.CheckLibWithHeader(env["jrtplib_libname"], "rtpsession.h", language='C++') : + env["HAVE_JRTPLIB"] = 1 + env["JRTPLIB_FLAGS"] = { "LIBS": [env["jrtplib_libname"]] } + env["JRTPLIB_FLAGS"].update(jrtplib_flags) + conf.Finish() + + #env["JRTPLIB_BUNDLED"] = 1 +#else : + #env["JRTPLIB_FLAGS"] = {} + ################################################################################ # DocBook setup ################################################################################ -- cgit v0.10.2-6-g49f6