Skip to content
Snippets Groups Projects
Commit cf58668e authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

Using install_name_tool also on not-installed libraries

This change allows to load libraries locate in src/lib more easily
on a mac. Notice that traditionally this was solved by setting
DYLD_LIBRARY_PATH. However, as of osx Capitan, DYLD_LIBRARY_PATH
does not work correctly. Fixing the installed path with
install_name_tool should solve the issue.

(backported from master)
parent b0fc9730
No related branches found
No related tags found
No related merge requests found
......@@ -322,6 +322,9 @@ ifeq ($(PLUMED_INSTALL),Install)
cd install && $(LDSO) -o libplumedKernel.$(SOEXT) $(addprefix ../,$(OBJ_KERNEL)) $(DYNAMIC_LIBS)
else
$(LDSO) -o $@ $^ $(DYNAMIC_LIBS)
ifeq ($(SOEXT),dylib)
install_name_tool -id "$(realpath .)/libplumedKernel.$(SOEXT)" libplumedKernel.$(SOEXT)
endif
endif
$(PLUMED_SHARED_OBJ): $(OBJ_KERNEL) $(OBJ_WRAPPER)
......@@ -330,6 +333,9 @@ ifeq ($(PLUMED_INSTALL),Install)
cd install && $(LDSO) -o libplumed.$(SOEXT) $(addprefix ../,$(OBJ_KERNEL)) $(addprefix ../,$(OBJ_WRAPPER)) $(DYNAMIC_LIBS)
else
$(LDSO) -o $@ $^ $(DYNAMIC_LIBS)
ifeq ($(SOEXT),dylib)
install_name_tool -id "$(realpath .)/libplumed.$(SOEXT)" $@
endif
endif
$(PLUMED_MAIN_STATIC): $(OBJ_MAIN) $(OBJ_KERNEL) $(OBJ_WRAPPER)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment