[vlc-commits] macOS buildsystem: Adjust rpath and install_name

Marvin Scholz git at videolan.org
Mon Feb 27 17:15:53 CET 2017


vlc | branch: master | Marvin Scholz <epirat07 at gmail.com> | Mon Feb 27 15:59:58 2017 +0100| [2b5baef57f7dfbaa91ba2f5c6b7ba9727f7c32f3] | committer: Marvin Scholz

macOS buildsystem: Adjust rpath and install_name

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2b5baef57f7dfbaa91ba2f5c6b7ba9727f7c32f3
---

 bin/Makefile.am | 4 ++++
 lib/Makefile.am | 3 +++
 src/Makefile.am | 3 +++
 3 files changed, 10 insertions(+)

diff --git a/bin/Makefile.am b/bin/Makefile.am
index 0185c99..2c0aee8 100644
--- a/bin/Makefile.am
+++ b/bin/Makefile.am
@@ -36,6 +36,8 @@ endif
 if HAVE_DARWIN
 vlc_osx_SOURCES = darwinvlc.m
 vlc_osx_LDFLAGS = $(LDFLAGS_vlc) -Wl,-framework,CoreFoundation,-framework,Cocoa
+vlc_osx_LDFLAGS += -Xlinker -rpath -Xlinker "@executable_path/lib/"
+vlc_osx_LDFLAGS += -Xlinker -rpath -Xlinker "@executable_path/plugins/"
 if HAVE_BREAKPAD
 vlc_osx_LDFLAGS += -Wl,-framework,Breakpad
 vlc_osx_OBJCFLAGS = -F$(CONTRIB_DIR)/Frameworks
@@ -48,6 +50,8 @@ vlc_osx_static_OBJCFLAGS = $(AM_OBJCFLAGS) \
 	-DTOP_SRCDIR=\"$$(cd "$(top_srcdir)"; pwd)\" \
 	$(NULL)
 vlc_osx_static_LDFLAGS = $(vlc_osx_LDFLAGS) -static
+vlc_osx_static_LDFLAGS += -Xlinker -rpath -Xlinker "@executable_path/../lib/.libs/"
+vlc_osx_static_LDFLAGS += -Xlinker -rpath -Xlinker "@executable_path/../src/.libs/"
 vlc_osx_static_LDADD = $(vlc_osx_LDADD)
 if HAVE_BREAKPAD
 vlc_osx_static_LDFLAGS += -Wl,-framework,Breakpad
diff --git a/lib/Makefile.am b/lib/Makefile.am
index e32278a..59571d8 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -71,6 +71,9 @@ endif
 if HAVE_OS2
 libvlc_la_LDFLAGS += -avoid-version
 endif
+if HAVE_DARWIN
+libvlc_la_LDFLAGS += -Xlinker -install_name -Xlinker @rpath/libvlc.dylib
+endif
 
 pkgconfig_DATA = libvlc.pc
 
diff --git a/src/Makefile.am b/src/Makefile.am
index 66b399f..fc63678 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -464,6 +464,9 @@ endif
 if HAVE_DBUS
 libvlccore_la_LIBADD += $(DBUS_LIBS)
 endif
+if HAVE_DARWIN
+libvlccore_la_LDFLAGS += -Xlinker -install_name -Xlinker @rpath/libvlccore.dylib
+endif
 
 libvlc_win32_rc.$(OBJEXT): libvlc_win32_rc.rc
 	$(WINDRES) --include-dir $(top_srcdir)/share --include-dir $(top_srcdir)/extras/package/win32 -i $< -o $@



More information about the vlc-commits mailing list