]> git.saurik.com Git - wxWidgets.git/commitdiff
On Mac, ensure that the library path and dependencies point to the right location...
authorKevin Ollivier <kevino@theolliviers.com>
Sun, 15 Mar 2009 16:07:56 +0000 (16:07 +0000)
committerKevin Ollivier <kevino@theolliviers.com>
Sun, 15 Mar 2009 16:07:56 +0000 (16:07 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59561 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

build/bakefiles/common.bkl
build/bakefiles/common_samples_intree.bkl
build/bakefiles/config.bkl
build/bakefiles/wx.bkl
configure.in
utils/helpview/src/helpview.bkl
utils/screenshotgen/src/screenshotgen.bkl

index 1618f74ee9773b74046fc2e7180dcdb9acd0af59..ceea7fb5e02bbddb0ce7d5fad3120568753c4295 100644 (file)
@@ -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'">
index 2c7af198ddb16ebe9af6a23bb45fec5b79fcc7cc..9de319fc22f98b8e1556fd7b78180e80c4e2a9e0 100644 (file)
         <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>
 
index 99efd7b1f24dd7868021409d662f9cce5729240a..17a9e686c94c199bd448ab6593de56c51df7b936 100644 (file)
@@ -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"/>
index 07f482ee13a49efb5eec845717d0a4a9535a2663..1265e4dc77da6fe68b4ee12cb57ceb040096b670 100644 (file)
             </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>
index 9b4bb50d72e9ce12b770ca14c24c7ee781b93758..ec8304c746e00b33f0568306016d7ff953ceb92a 100644 (file)
@@ -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)
index add404e5ce8174fc191e63cfb07f7be795e61817..5b11917f5d80758c87943a90ca1cbfb2d7f160b5 100644 (file)
@@ -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
index 016e20b5424cf07c6ef5ee26b6a6b7fb2d381b41..14457665f90a17aab6b15f49b3cd588dd65b3196 100644 (file)
@@ -12,7 +12,6 @@
 
             <wx-mac-app-bundle/>
             <ldflags>$(SAMPLES_RPATH_FLAG)</ldflags>
-            <postlink-command>$(SAMPLES_RPATH_POSTLINK)</postlink-command>
         </if>
 
         <sources>