Add better logging for the Linxu includes search
This commit is contained in:
@@ -24,14 +24,30 @@ namespace Flax.Build.Platforms
|
|||||||
{
|
{
|
||||||
// Setup system paths
|
// Setup system paths
|
||||||
var includePath = Path.Combine(ToolsetRoot, "usr", "include");
|
var includePath = Path.Combine(ToolsetRoot, "usr", "include");
|
||||||
|
if (!Directory.Exists(includePath))
|
||||||
|
{
|
||||||
|
var error = $"Missing toolset header files location {includePath}";
|
||||||
|
Log.Error(error);
|
||||||
|
}
|
||||||
SystemIncludePaths.Add(includePath);
|
SystemIncludePaths.Add(includePath);
|
||||||
var cppIncludePath = Path.Combine(includePath, "c++", ClangVersion.ToString());
|
var cppIncludePath = Path.Combine(includePath, "c++", ClangVersion.ToString());
|
||||||
if (Directory.Exists(cppIncludePath))
|
if (!Directory.Exists(cppIncludePath))
|
||||||
SystemIncludePaths.Add(cppIncludePath);
|
{
|
||||||
|
var error = $"Missing Clang {ClangVersion} C++ header files location {cppIncludePath}";
|
||||||
|
cppIncludePath = Path.Combine(ToolsetRoot, "usr", "lib", "llvm-" + ClangVersion.Major.ToString(), "include", "c++", "v1");
|
||||||
|
if (!Directory.Exists(cppIncludePath))
|
||||||
|
Log.Error(error);
|
||||||
|
}
|
||||||
|
SystemIncludePaths.Add(cppIncludePath);
|
||||||
var clangLibPath = Path.Combine(ToolsetRoot, "usr", "lib", "clang");
|
var clangLibPath = Path.Combine(ToolsetRoot, "usr", "lib", "clang");
|
||||||
var clangIncludePath = Path.Combine(clangLibPath, ClangVersion.Major.ToString(), "include");
|
var clangIncludePath = Path.Combine(clangLibPath, ClangVersion.Major.ToString(), "include");
|
||||||
if (!Directory.Exists(clangIncludePath))
|
if (!Directory.Exists(clangIncludePath))
|
||||||
|
{
|
||||||
|
var error = $"Missing Clang {ClangVersion} header files location {clangIncludePath}";
|
||||||
clangIncludePath = Path.Combine(clangLibPath, ClangVersion.ToString(), "include");
|
clangIncludePath = Path.Combine(clangLibPath, ClangVersion.ToString(), "include");
|
||||||
|
if (!Directory.Exists(clangIncludePath))
|
||||||
|
Log.Error(error);
|
||||||
|
}
|
||||||
SystemIncludePaths.Add(clangIncludePath);
|
SystemIncludePaths.Add(clangIncludePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user