Fix non-Windows platforms
Signed-off-by: AMZN-Phil <pconroy@amazon.com>
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user