Fix non-Windows platforms

Signed-off-by: AMZN-Phil <pconroy@amazon.com>
This commit is contained in:
AMZN-Phil
2021-11-20 10:23:50 -08:00
parent e1b6054ff8
commit 74e1ee1862
2 changed files with 11 additions and 9 deletions
@@ -19,10 +19,9 @@ namespace O3DE::ProjectManager
// The list of clang C/C++ compiler command lines to validate on the host Linux system
const QStringList SupportedClangVersions = {"13", "12", "11", "10", "9", "8", "7", "6.0"};
AZ::Outcome<QProcessEnvironment, QString> GetCommandLineProcessEnvironment()
AZ::Outcome<void, QString> SetupCommandLineProcessEnvironment()
{
QProcessEnvironment currentEnvironment(QProcessEnvironment::systemEnvironment());
return AZ::Success(currentEnvironment);
return AZ::Success();
}
AZ::Outcome<QString, QString> FindSupportedCompilerForPlatform()
@@ -18,17 +18,20 @@ namespace O3DE::ProjectManager
{
namespace ProjectUtils
{
AZ::Outcome<QProcessEnvironment, QString> GetCommandLineProcessEnvironment()
AZ::Outcome<void, QString> GetCommandLineProcessEnvironment()
{
// For CMake on Mac, if its installed through home-brew, then it will be installed
// under /usr/local/bin, which may not be in the system PATH environment.
// Add that path for the command line process so that it will be able to locate
// a home-brew installed version of CMake
QProcessEnvironment currentEnvironment(QProcessEnvironment::systemEnvironment());
QString pathValue = currentEnvironment.value("PATH");
pathValue += ":/usr/local/bin";
currentEnvironment.insert("PATH", pathValue);
return AZ::Success(currentEnvironment);
QString pathEnv = qEnvironmentVariable("PATH");
if (!pathEnv.contains("/usr/local/bin"))
{
pathEnv += ":/usr/local/bin";
qputenv("PATH", pathEnv.toStdString().c_str());
}
return AZ::Success();
}
AZ::Outcome<QString, QString> FindSupportedCompilerForPlatform()