summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Schoonjans <Tom.Schoonjans@diamond.ac.uk>2018-02-14 08:17:46 +0000
committerRico Tzschichholz <ricotz@ubuntu.com>2018-04-09 07:40:56 +0200
commitd0b04f18777eb170d84fcc1cdb1ddacad66bcd33 (patch)
treeaf3a5c7abca6a7df10dc67f86c75d4967308f807
parentdc5d8dbedc0f3d16344f1a3648970c9783c08370 (diff)
downloadgobject-introspection-d0b04f18777eb170d84fcc1cdb1ddacad66bcd33.tar.gz
giscanner: fix --no-libtool on macOS
Currently g-ir-scanner fails on macOS when invoked in --no-libtool mode if the library it links to has not been installed into its destination (which is likely to be the case). In libtool mode this issue does not occur as DYLD_LIBRARY_PATH will get set by libtool in an appropriate manner. This patch ensures DYLD_LIBRARY_PATH will get set. This patch is also essential for meson and cmake to generate gobject-introspection bindings. More information can be found e.g. at https://mail.gnome.org/archives/gtk-osx-users-list/2018-February/msg00000.html, and the github repo that was produced subsequently at https://github.com/wagavulin/gir-mac-sample.
-rw-r--r--giscanner/ccompiler.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/giscanner/ccompiler.py b/giscanner/ccompiler.py
index a8bd5b13..d10327c8 100644
--- a/giscanner/ccompiler.py
+++ b/giscanner/ccompiler.py
@@ -119,7 +119,7 @@ class CCompiler(object):
if os.name == 'nt':
runtime_path_envvar = ['LIB', 'PATH']
else:
- runtime_path_envvar = ['LD_LIBRARY_PATH']
+ runtime_path_envvar = ['LD_LIBRARY_PATH', 'DYLD_LIBRARY_PATH']
# Search the current directory first
# (This flag is not supported nor needed for Visual C++)
args.append('-L.')