In addition to changing the libraries themselves to point to the dependencies
in their installed location, we also need to do the same thing for wxrc when
installing it under OS X, otherwise it wouldn't run once the libraries are not
available in their original location any more.
Closes #15452.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74909
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
cat <<EOF >change-install-names
#!/bin/sh
libnames=\`cd \${2} ; ls -1 | grep '\.[0-9][0-9]*\.dylib\$'\`
cat <<EOF >change-install-names
#!/bin/sh
libnames=\`cd \${2} ; ls -1 | grep '\.[0-9][0-9]*\.dylib\$'\`
+changes=''
+for dep in \${libnames} ; do
+ changes="\${changes} -change \${4}/\${dep} \${3}/\${dep}"
+done
for i in \${libnames} ; do
for i in \${libnames} ; do
- ${HOST_PREFIX}install_name_tool -id \${3}/\${i} \${1}/\${i}
- for dep in \${libnames} ; do
- ${HOST_PREFIX}install_name_tool -change \${2}/\${dep} \${3}/\${dep} \${1}/\${i}
- done
+ ${HOST_PREFIX}install_name_tool \${changes} -id \${3}/\${i} \${1}/\${i}
+${HOST_PREFIX}install_name_tool \${changes} \${2}/wxrc-${WX_RELEASE}
EOF
chmod +x change-install-names
EOF
chmod +x change-install-names
- DYLIB_RPATH_INSTALL="\$(wx_top_builddir)/change-install-names \${DESTDIR}\${libdir} \$(wx_top_builddir)/lib \${libdir}"
+ DYLIB_RPATH_INSTALL="\$(wx_top_builddir)/change-install-names \${DESTDIR}\${libdir} \${DESTDIR}\${bindir} \${libdir} \$(wx_top_builddir)/lib"
fi
HEADER_PAD_OPTION="-headerpad_max_install_names"
fi
HEADER_PAD_OPTION="-headerpad_max_install_names"
cat <<EOF >change-install-names
#!/bin/sh
libnames=\`cd \${2} ; ls -1 | grep '\.[[0-9]][[0-9]]*\.dylib\$'\`
cat <<EOF >change-install-names
#!/bin/sh
libnames=\`cd \${2} ; ls -1 | grep '\.[[0-9]][[0-9]]*\.dylib\$'\`
+changes=''
+for dep in \${libnames} ; do
+ changes="\${changes} -change \${4}/\${dep} \${3}/\${dep}"
+done
for i in \${libnames} ; do
for i in \${libnames} ; do
- ${HOST_PREFIX}install_name_tool -id \${3}/\${i} \${1}/\${i}
- for dep in \${libnames} ; do
- ${HOST_PREFIX}install_name_tool -change \${2}/\${dep} \${3}/\${dep} \${1}/\${i}
- done
+ ${HOST_PREFIX}install_name_tool \${changes} -id \${3}/\${i} \${1}/\${i}
+${HOST_PREFIX}install_name_tool \${changes} \${2}/wxrc-${WX_RELEASE}
EOF
chmod +x change-install-names
EOF
chmod +x change-install-names
- DYLIB_RPATH_INSTALL="\$(wx_top_builddir)/change-install-names \${DESTDIR}\${libdir} \$(wx_top_builddir)/lib \${libdir}"
+ DYLIB_RPATH_INSTALL="\$(wx_top_builddir)/change-install-names \${DESTDIR}\${libdir} \${DESTDIR}\${bindir} \${libdir} \$(wx_top_builddir)/lib"
fi
dnl the HEADER_PAD_OPTION is required by some wx samples to avoid the error:
fi
dnl the HEADER_PAD_OPTION is required by some wx samples to avoid the error: