forked from qt-creator/qt-creator
QNX: Return the computed env vars.
They are needed to fix compilation of qnx apps from QtC. The mimicked env vars are not enough to build qt apps for qnx660, so let's try to return the right env vars, otherwise fallback to the old implementation. Change-Id: I9cd0bbf18cea2ac51035f4cbc88c7e4063355830 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
@@ -155,13 +155,18 @@ QList<Utils::EnvironmentItem> QnxUtils::qnxEnvironmentFromEnvFile(const QString
|
||||
return items;
|
||||
}
|
||||
|
||||
bool QnxUtils::isValidNdkPath(const QString &ndkPath)
|
||||
{
|
||||
return QFileInfo::exists(envFilePath(ndkPath));
|
||||
}
|
||||
|
||||
QString QnxUtils::envFilePath(const QString &ndkPath, const QString &targetVersion)
|
||||
{
|
||||
QDir ndk(ndkPath);
|
||||
QStringList entries;
|
||||
if (Utils::HostOsInfo::isWindowsHost())
|
||||
entries = ndk.entryList(QStringList(QLatin1String("*-env.bat")));
|
||||
else
|
||||
entries = ndk.entryList(QStringList(QLatin1String("*-env.sh")));
|
||||
|
||||
if (!entries.isEmpty())
|
||||
return ndk.absoluteFilePath(entries.first());
|
||||
|
||||
QString envFile;
|
||||
if (Utils::HostOsInfo::isWindowsHost())
|
||||
envFile = ndkPath + QLatin1String("/bbndk-env.bat");
|
||||
@@ -292,6 +297,10 @@ QString QnxUtils::qdeInstallProcess(const QString &ndkPath, const QString &targe
|
||||
|
||||
QList<Utils::EnvironmentItem> QnxUtils::qnxEnvironment(const QString &sdkPath)
|
||||
{
|
||||
QList<Utils::EnvironmentItem> env = qnxEnvironmentFromEnvFile(envFilePath(sdkPath));
|
||||
if (!env.isEmpty())
|
||||
return env;
|
||||
|
||||
// Mimic what the SDP installer puts into the system environment
|
||||
|
||||
QList<Utils::EnvironmentItem> environmentItems;
|
||||
|
||||
Reference in New Issue
Block a user