This avoids failures when running install_name_tool on Mac when creating relocatable binaries using the bundled private frameworks.
if INSTALL_MACOSX
lyx_LDFLAGS = -framework AppKit -framework ApplicationServices \
-Wl,-rpath,@loader_path/../Frameworks \
- -Wl,-rpath,@executable_path/../Frameworks
+ -Wl,-rpath,@executable_path/../Frameworks \
+ -Wl,-headerpad_max_install_names
endif
if INSTALL_MACOSX
$(QT_LIB) $(QT_LDFLAGS) $(LIBSHLWAPI) $(LIBPSAPI)
if INSTALL_MACOSX
-lyxclient_LDFLAGS = -framework AppKit
+lyxclient_LDFLAGS = -framework AppKit \
+ -Wl,-rpath,@loader_path/../Frameworks \
+ -Wl,-rpath,@executable_path/../Frameworks \
+ -Wl,-headerpad_max_install_names
endif
SOURCEFILES = \
lyxconvert_LDFLAGS = -framework AppKit \
-Wl,-rpath,@loader_path/../Frameworks \
- -Wl,-rpath,@executable_path/../Frameworks
+ -Wl,-rpath,@executable_path/../Frameworks \
+ -Wl,-headerpad_max_install_names
else
check_trivstring
if INSTALL_MACOSX
-ADD_FRAMEWORKS = -framework QtCore -framework AppKit -framework ApplicationServices
+ADD_FRAMEWORKS = \
+ -framework QtCore -framework AppKit -framework ApplicationServices \
+ -Wl,-rpath,@loader_path/../Frameworks \
+ -Wl,-rpath,@executable_path/../Frameworks \
+ -Wl,-headerpad_max_install_names
endif
check_convert_LDADD = liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) $(QT_CORE_LIBS) $(LIBSHLWAPI) @LIBS@
if INSTALL_MACOSX
tex2lyx_LDFLAGS = -framework AppKit \
-Wl,-rpath,@loader_path/../Frameworks \
- -Wl,-rpath,@executable_path/../Frameworks
+ -Wl,-rpath,@executable_path/../Frameworks \
+ -Wl,-headerpad_max_install_names
endif
.PHONY: alltests alltests-recursive updatetests