forked from qt-creator/qt-creator
Mac: Use rpath instead of executable_path.
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.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
macx {
|
||||
!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
|
||||
|
||||
Reference in New Issue
Block a user