Fix build on Mac.

This commit is contained in:
con
2011-04-29 10:26:27 +02:00
parent c3fa2d35a0
commit 5096ff3df3

View File

@@ -176,22 +176,17 @@ void Environment::prependOrSetPath(const QString &value)
void Environment::prependOrSetLibrarySearchPath(const QString &value)
{
#ifdef Q_OS_WIN
const QChar sep = QLatin1Char(';');
#else
const QChar sep = QLatin1Char(':');
#endif
#ifdef Q_OS_WIN
const QLatin1String path("PATH");
#elif defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
const QLatin1String path("LD_LIBRARY_PATH");
#else
#ifdef Q_OS_MAC
// we could set DYLD_LIBRARY_PATH on Mac but it is unnecessary in practice
return;
#endif
#elif Q_OS_WIN
const QChar sep = QLatin1Char(';');
const QLatin1String path("PATH");
prependOrSet(path, QDir::toNativeSeparators(value), QString(sep));
#elif Q_OS_UNIX
const QChar sep = QLatin1Char(':');
const QLatin1String path("LD_LIBRARY_PATH");
prependOrSet(path, QDir::toNativeSeparators(value), QString(sep));
#endif
}
Environment Environment::systemEnvironment()