On Mac, ensure that the library path and dependencies point to the right location whether or not the library is installed.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59561 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
ae255e2948
commit
19beefa6f3
@ -637,8 +637,10 @@ $(TAB)$(VC_COMPILER) /EP /nologo "$(DOLLAR)(InputPath)" > "$(SETUPHDIR)\wx\msw\r
|
||||
<if cond="FORMAT=='autoconf'">
|
||||
<res-include>$(RCDEFDIR)</res-include>
|
||||
<res-include>$(TOP_SRCDIR)include</res-include>
|
||||
<postlink-command>$(DYLIB_RPATH_POSTLINK)</postlink-command>
|
||||
</if>
|
||||
<win32-res>$(WXTOPDIR)src/msw/version.rc</win32-res>
|
||||
|
||||
</template>
|
||||
|
||||
<template id="wx_3rdparty_dependencies_gui" cond="USE_GUI=='1'">
|
||||
|
@ -53,13 +53,11 @@
|
||||
<if cond="FORMAT=='autoconf'">
|
||||
<wx-mac-app-bundle/>
|
||||
<ldflags>$(SAMPLES_RPATH_FLAG)</ldflags>
|
||||
<postlink-command>$(SAMPLES_RPATH_POSTLINK)</postlink-command>
|
||||
</if>
|
||||
</template>
|
||||
<template id="wx_sample_console" template="wx_util_console">
|
||||
<if cond="FORMAT=='autoconf'">
|
||||
<ldflags>$(SAMPLES_RPATH_FLAG)</ldflags>
|
||||
<postlink-command>$(SAMPLES_RPATH_POSTLINK)</postlink-command>
|
||||
</if>
|
||||
</template>
|
||||
|
||||
|
@ -362,8 +362,9 @@ to run the tests, include CppUnit library here.
|
||||
<option name="EXTRALIBS_GNOMEPRINT"/>
|
||||
<option name="CXXWARNINGS"/>
|
||||
<option name="HOST_SUFFIX"/>
|
||||
<option name="DYLIB_RPATH_INSTALL"/>
|
||||
<option name="DYLIB_RPATH_POSTLINK"/>
|
||||
<option name="SAMPLES_RPATH_FLAG"/>
|
||||
<option name="SAMPLES_RPATH_POSTLINK"/>
|
||||
|
||||
<!-- see configure.in; it's required by some samples on Mac OS X -->
|
||||
<option name="HEADER_PAD_OPTION"/>
|
||||
|
@ -101,6 +101,12 @@
|
||||
</command>
|
||||
</action>
|
||||
|
||||
<modify-target target="install">
|
||||
<command>
|
||||
$(DYLIB_RPATH_INSTALL)
|
||||
</command>
|
||||
</modify-target>
|
||||
|
||||
<set var="RCDEFS_H">
|
||||
<if cond="TOOLKIT=='MSW'">msw/rcdefs.h</if>
|
||||
</set>
|
||||
|
18
configure.in
18
configure.in
@ -133,7 +133,8 @@ DEFAULT_DEFAULT_wxUSE_DFB=0
|
||||
|
||||
PROGRAM_EXT=
|
||||
SAMPLES_RPATH_FLAG=
|
||||
SAMPLES_RPATH_POSTLINK=
|
||||
DYLIB_RPATH_INSTALL=
|
||||
DYLIB_RPATH_POSTLINK=
|
||||
|
||||
DEFAULT_STD_FLAG=yes
|
||||
|
||||
@ -3781,17 +3782,19 @@ if test "$wxUSE_SHARED" = "yes"; then
|
||||
*-*-darwin* )
|
||||
install_name_tool=`which ${HOST_PREFIX}install_name_tool`
|
||||
if test "$install_name_tool" -a -x "$install_name_tool"; then
|
||||
SAMPLES_RPATH_POSTLINK="\$(wx_top_builddir)/change-install-names \$(LIBDIRNAME) \$(prefix) \$@"
|
||||
DYLIB_RPATH_POSTLINK="${HOST_PREFIX}install_name_tool -id \$@ \$@"
|
||||
cat <<EOF >change-install-names
|
||||
#!/bin/sh
|
||||
libnames=\`cd \${1} ; ls -1 | grep '\.[[0-9]][[0-9]]*\.dylib\$'\`
|
||||
inst_cmd="${HOST_PREFIX}install_name_tool "
|
||||
for i in \${libnames} ; do
|
||||
inst_cmd="\${inst_cmd} -change \${2}/lib/\${i} \${1}/\${i}"
|
||||
${HOST_PREFIX}install_name_tool -id \${1}/\${i} \${1}/\${i}
|
||||
for dep in \${libnames} ; do
|
||||
${HOST_PREFIX}install_name_tool -change \${2}/\${dep} \${1}/\${dep} \${1}/\${i}
|
||||
done
|
||||
done
|
||||
\${inst_cmd} \${3}
|
||||
EOF
|
||||
chmod +x change-install-names
|
||||
DYLIB_RPATH_INSTALL="\$(wx_top_builddir)/change-install-names \${libdir} \$(wx_top_builddir)/lib"
|
||||
fi
|
||||
|
||||
dnl the HEADER_PAD_OPTION is required by some wx samples to avoid the error:
|
||||
@ -3818,7 +3821,7 @@ EOF
|
||||
|
||||
if test $wxUSE_RPATH = "no"; then
|
||||
SAMPLES_RPATH_FLAG=''
|
||||
SAMPLES_RPATH_POSTLINK=''
|
||||
DYLIB_PATH_POSTLINK=''
|
||||
WXCONFIG_RPATH=''
|
||||
fi
|
||||
|
||||
@ -7647,8 +7650,9 @@ if test "$TOOLKIT_LOWERCASE" = "xxx"; then
|
||||
fi
|
||||
AC_SUBST(TOOLKIT_LOWERCASE)
|
||||
AC_SUBST(TOOLKIT_VERSION)
|
||||
AC_SUBST(DYLIB_RPATH_INSTALL)
|
||||
AC_SUBST(DYLIB_RPATH_POSTLINK)
|
||||
AC_SUBST(SAMPLES_RPATH_FLAG)
|
||||
AC_SUBST(SAMPLES_RPATH_POSTLINK)
|
||||
AC_SUBST(HEADER_PAD_OPTION)
|
||||
AC_SUBST(HOST_SUFFIX)
|
||||
AC_SUBST(CPPUNIT_CFLAGS)
|
||||
|
@ -9,7 +9,6 @@
|
||||
<if cond="FORMAT=='autoconf'">
|
||||
<wx-mac-app-bundle/>
|
||||
<ldflags>$(SAMPLES_RPATH_FLAG)</ldflags>
|
||||
<postlink-command>$(SAMPLES_RPATH_POSTLINK)</postlink-command>
|
||||
</if>
|
||||
<sources>
|
||||
helpview.cpp
|
||||
|
@ -12,7 +12,6 @@
|
||||
|
||||
<wx-mac-app-bundle/>
|
||||
<ldflags>$(SAMPLES_RPATH_FLAG)</ldflags>
|
||||
<postlink-command>$(SAMPLES_RPATH_POSTLINK)</postlink-command>
|
||||
</if>
|
||||
|
||||
<sources>
|
||||
|
Loading…
Reference in New Issue
Block a user