summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2017-02-03 16:58:36 +0100
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2017-03-20 15:50:22 +0100
commita3336fc3445fca283be97528d60f2f55501491b0 (patch)
tree74ba5848211477a9ca2c77d8b1f5a3aba0ee6a98 /build
parent99718ef1734c0db06034127da703f70a1c30f1a3 (diff)
downloadastra-a3336fc3445fca283be97528d60f2f55501491b0.tar.gz
astra-a3336fc3445fca283be97528d60f2f55501491b0.tar.bz2
astra-a3336fc3445fca283be97528d60f2f55501491b0.tar.xz
astra-a3336fc3445fca283be97528d60f2f55501491b0.zip
Use @loader_path to make mex files find libastra.0.dylib in cwd
Diffstat (limited to 'build')
-rw-r--r--build/linux/Makefile.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/build/linux/Makefile.in b/build/linux/Makefile.in
index ae3dec8..0120d60 100644
--- a/build/linux/Makefile.in
+++ b/build/linux/Makefile.in
@@ -304,6 +304,12 @@ mex: $(MATLAB_MEX)
%.$(MEXSUFFIX): %.o $(MATLAB_CXX_OBJECTS) libastra.la
$(MEX) LDFLAGS="$(MEXLDFLAGS)" $(MEXFLAGS) $(LIBS) $(MEXLIBS) -lastra -output $* $*.o $(MATLAB_CXX_OBJECTS)
+ifeq ($(install_type),module)
+ifeq ($(macos),yes)
+ @# tell macOS dynamic loader to look in mex directory for libastra.0.dylib
+ install_name_tool -change `otool -DX .libs/$(SONAME)` @loader_path/$(SONAME) $@
+endif
+endif
ifeq ($(python),yes)
matlab/mex/astra_mex_plugin_c.$(MEXSUFFIX): matlab/mex/astra_mex_plugin_c.o $(MATLAB_CXX_OBJECTS) libastra.la