From a3336fc3445fca283be97528d60f2f55501491b0 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Fri, 3 Feb 2017 16:58:36 +0100 Subject: Use @loader_path to make mex files find libastra.0.dylib in cwd --- build/linux/Makefile.in | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'build/linux') 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 -- cgit v1.2.3