Environment::prependOrSetLibrarySearchPath: Set DYLD_LIBRARY_PATH on OS X

Change-Id: I25a86189b9308f5ac557a705b32bb4986f1b4519
Task-number: QTCREATORBUG-14022
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
Daniel Teske
2015-09-02 17:06:58 +02:00
parent 4ffb6649ec
commit c2ef849997

View File

@@ -193,6 +193,13 @@ void Environment::prependOrSetLibrarySearchPath(const QString &value)
prependOrSet(path, QDir::toNativeSeparators(value), QString(sep));
break;
}
case OsTypeMac: {
const QString sep = QLatin1String(":");
const QString nativeValue = QDir::toNativeSeparators(value);
prependOrSet(QLatin1String("DYLD_LIBRARY_PATH"), nativeValue, sep);
prependOrSet(QLatin1String("DYLD_FRAMEWORK_PATH"), nativeValue, sep);
break;
}
case OsTypeLinux:
case OsTypeOtherUnix: {
const QChar sep = QLatin1Char(':');
@@ -200,7 +207,7 @@ void Environment::prependOrSetLibrarySearchPath(const QString &value)
prependOrSet(path, QDir::toNativeSeparators(value), QString(sep));
break;
}
default: // we could set DYLD_LIBRARY_PATH on Mac but it is unnecessary in practice
default:
break;
}
}