summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2011-11-03 18:23:53 -0400
committerColin Walters <walters@verbum.org>2011-11-03 18:23:53 -0400
commite33482ba5e4f854a56a22c966a1f6ea1c46e3bbb (patch)
treec42f4540e3f02b3d5c4f527b8780cdd62139914e
parent22e225a7af5fb2f5f5b6598f6c42be2b960eb5f7 (diff)
downloadgobject-introspection-e33482ba5e4f854a56a22c966a1f6ea1c46e3bbb.tar.gz
scanner: Also add an RPATH for library paths specified
Introspection scanning is a bit special in that we both compile *and* run a temporary binary. In some cases like jhbuild we will pick up the runtime location of libraries via LD_LIBRARY_PATH. But this falls over when we've been given a private subdirectory, since it won't be in that path. Let's just "do the right thing" here by injecting an rpath for the directories as well.
-rw-r--r--giscanner/dumper.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/giscanner/dumper.py b/giscanner/dumper.py
index 9b20f387..3645d4ce 100644
--- a/giscanner/dumper.py
+++ b/giscanner/dumper.py
@@ -277,6 +277,11 @@ class DumpCompiler(object):
for library_path in self._options.library_paths:
args.append('-L' + library_path)
+ if libtool:
+ args.append('-rpath')
+ args.append(library_path)
+ else:
+ args.append('-Wl,-rpath=' + library_path)
args.extend(self._run_pkgconfig('--libs'))