From 5096ff3df3709b0a7b13432793a78d59f1f7b82e Mon Sep 17 00:00:00 2001 From: con <qtc-committer@nokia.com> Date: Fri, 29 Apr 2011 10:26:27 +0200 Subject: [PATCH] Fix build on Mac. --- src/libs/utils/environment.cpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/libs/utils/environment.cpp b/src/libs/utils/environment.cpp index 73a2fff92bb..41d28dcede2 100644 --- a/src/libs/utils/environment.cpp +++ b/src/libs/utils/environment.cpp @@ -176,22 +176,17 @@ void Environment::prependOrSetPath(const QString &value) void Environment::prependOrSetLibrarySearchPath(const QString &value) { -#ifdef Q_OS_WIN +#ifdef Q_OS_MAC + // we could set DYLD_LIBRARY_PATH on Mac but it is unnecessary in practice +#elif 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) + prependOrSet(path, QDir::toNativeSeparators(value), QString(sep)); +#elif Q_OS_UNIX + const QChar sep = QLatin1Char(':'); const QLatin1String path("LD_LIBRARY_PATH"); -#else - // we could set DYLD_LIBRARY_PATH on Mac but it is unnecessary in practice - return; -#endif - prependOrSet(path, QDir::toNativeSeparators(value), QString(sep)); +#endif } Environment Environment::systemEnvironment() -- GitLab