OSDN Git Service

Mac: Use rpath instead of executable_path.
authorcon <qtc-committer@nokia.com>
Mon, 1 Nov 2010 11:15:49 +0000 (12:15 +0100)
committercon <qtc-committer@nokia.com>
Mon, 1 Nov 2010 14:00:25 +0000 (15:00 +0100)
Because executable_path and loader_path are just too inflexible for some
stuff. The rpath is supposed to be set to the Qt Creator app's Contents
folder.
Compiling on 10.4 now requires to enter compatibility mode via
QTC_TIGER_COMPAT env variable or TIGER_COMPAT_MODE qmake variable.

qtcreator.pri
src/qtcreatorplugin.pri
src/rpath.pri

index 2994770..f1a9f6a 100644 (file)
@@ -99,6 +99,7 @@ macx {
     IDE_BIN_PATH     = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/MacOS
     contains(QT_CONFIG, ppc):CONFIG += ppc x86
     copydata = 1
+    isEmpty(TIGER_COMPAT_MODE):TIGER_COMPAT_MODE=$$(QTC_TIGER_COMPAT)
 } else {
     win32 {
         contains(TEMPLATE, vc.*)|contains(TEMPLATE_PREFIX, vc):vcproj = 1
index a13d519..f27097c 100644 (file)
@@ -28,7 +28,12 @@ QMAKE_EXTRA_COMPILERS += copy2build
 
 
 macx {
+    !isEmpty(TIGER_COMPAT_MODE) {
         QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../PlugIns/$${PROVIDER}/
+    } else {
+        QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/PlugIns/$${PROVIDER}/
+        QMAKE_LFLAGS += -Wl,-rpath,@loader_path/../../
+    }
 } else:linux-* {
     #do the rpath by hand since it's not possible to use ORIGIN in QMAKE_RPATHDIR
     QMAKE_RPATHDIR += \$\$ORIGIN
index 750d0ed..c0882c4 100644 (file)
@@ -1,5 +1,10 @@
 macx {
-    QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../PlugIns/
+    !isEmpty(TIGER_COMPAT_MODE) {
+        QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../PlugIns/
+    } else {
+        QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/PlugIns/
+        QMAKE_LFLAGS += -Wl,-rpath,@loader_path/../
+    }
 } else:linux-* {
     #do the rpath by hand since it's not possible to use ORIGIN in QMAKE_RPATHDIR
     # this expands to $ORIGIN (after qmake and make), it does NOT read a qmake var