commit b090327dec97253f026b9ba0b358842150f4435d
Author: Stephan Witt <[email protected]>
Date: Fri Sep 21 21:46:47 2018 +0200
Add -headerpad_max_install_names option to linker calls and make run path
configuration consistent.
This avoids failures when running install_name_tool on Mac when creating
relocatable binaries using the bundled private frameworks.
(cherry picked from commit d9c0807227a9bdff2d28a80181d0e7ec5532ba1e)
---
src/Makefile.am | 3 ++-
src/client/Makefile.am | 5 ++++-
src/convert/Makefile.am | 3 ++-
src/support/Makefile.am | 6 +++++-
src/tex2lyx/Makefile.am | 3 ++-
5 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 28592fb..99155a6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -48,7 +48,8 @@ endif
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
diff --git a/src/client/Makefile.am b/src/client/Makefile.am
index f1d766b..c13caed 100644
--- a/src/client/Makefile.am
+++ b/src/client/Makefile.am
@@ -17,7 +17,10 @@ lyxclient_LDADD = \
$(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 = \
diff --git a/src/convert/Makefile.am b/src/convert/Makefile.am
index 2457145..9b6bd7e 100644
--- a/src/convert/Makefile.am
+++ b/src/convert/Makefile.am
@@ -23,7 +23,8 @@ lyxconvert_LDADD = \
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
diff --git a/src/support/Makefile.am b/src/support/Makefile.am
index d3c902c..1226fbe 100644
--- a/src/support/Makefile.am
+++ b/src/support/Makefile.am
@@ -163,7 +163,11 @@ check_PROGRAMS = \
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@
diff --git a/src/tex2lyx/Makefile.am b/src/tex2lyx/Makefile.am
index da7c318..15817d7 100644
--- a/src/tex2lyx/Makefile.am
+++ b/src/tex2lyx/Makefile.am
@@ -135,7 +135,8 @@ tex2lyx_LDADD = \
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