summaryrefslogtreecommitdiff
path: root/giscanner/ccompiler.py
diff options
context:
space:
mode:
authorTom Schoonjans <Tom.Schoonjans@diamond.ac.uk>2018-02-14 08:17:46 +0000
committerPhilip Chimento <philip.chimento@gmail.com>2018-04-08 15:33:57 -0700
commit3a5c4dc8d776ad2bfe18e47b2ee940cb9f1fc5d4 (patch)
treef1b0ac0d936eec283c63cd8ccd70dcaf46fa8b7f /giscanner/ccompiler.py
parent7e9c478104fd5e864bbcbcaa54634e8251588884 (diff)
downloadgobject-introspection-3a5c4dc8d776ad2bfe18e47b2ee940cb9f1fc5d4.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.
Diffstat (limited to 'giscanner/ccompiler.py')
-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.')