From 782ca7bf2099368e31dbc00d8e71848268e88bd1 Mon Sep 17 00:00:00 2001 From: Jim Bosch Date: Mon, 16 Apr 2012 23:43:57 -0400 Subject: [PATCH] add custom rpath option to SCons builds --- SConscript | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/SConscript b/SConscript index a9d78c6a..f79b1243 100644 --- a/SConscript +++ b/SConscript @@ -174,6 +174,8 @@ def setupOptions(): metavar="DIR", help="location of Boost header files") AddOption("--with-boost-lib", dest="boost_lib", type="string", nargs=1, action="store", metavar="DIR", help="location of Boost libraries") + AddOption("--rpath", dest="custom_rpath", type="string", action="append", + help="runtime link paths to add to libraries and executables; may be passed more than once") def makeEnvironment(): env = Environment() @@ -185,6 +187,9 @@ def makeEnvironment(): env["ENV"]["DYLD_LIBRARY_PATH"] = os.environ["DYLD_LIBRARY_PATH"] if os.environ.has_key("PYTHONPATH"): env["ENV"]["PYTHONPATH"] = os.environ["PYTHONPATH"] + custom_rpath = GetOption("custom_rpath") + if custom_rpath is not None: + env.AppendUnique(RPATH=custom_rpath) return env def setupTargets(env, root="."):