macOS buildsystem: Adjust rpath and install_name
authorMarvin Scholz <epirat07@gmail.com>
Mon, 27 Feb 2017 14:59:58 +0000 (15:59 +0100)
committerMarvin Scholz <epirat07@gmail.com>
Mon, 27 Feb 2017 16:15:36 +0000 (17:15 +0100)
bin/Makefile.am
lib/Makefile.am
src/Makefile.am

index 0185c99..2c0aee8 100644 (file)
@@ -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
index e32278a..59571d8 100644 (file)
@@ -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
 
index 66b399f..fc63678 100644 (file)
@@ -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 $@