From d48f61ea33a60c58a80f1b3cfb79eda6ea78dfa0 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Wed, 15 Feb 2023 11:18:15 +0100 Subject: [PATCH] Fix regression from e40f51cfc5908f8fcd36e531da98dde46187c665 --- .../Platforms/Linux/LinuxToolchain.cs | 22 +++++++------------ 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/Source/Tools/Flax.Build/Platforms/Linux/LinuxToolchain.cs b/Source/Tools/Flax.Build/Platforms/Linux/LinuxToolchain.cs index 1a0557c94..f8faa3cc0 100644 --- a/Source/Tools/Flax.Build/Platforms/Linux/LinuxToolchain.cs +++ b/Source/Tools/Flax.Build/Platforms/Linux/LinuxToolchain.cs @@ -24,21 +24,15 @@ namespace Flax.Build.Platforms { // Setup system paths 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); + if (Directory.Exists(includePath)) + SystemIncludePaths.Add(includePath); + else + Log.Error($"Missing toolset header files location {includePath}"); var cppIncludePath = Path.Combine(includePath, "c++", ClangVersion.ToString()); - if (!Directory.Exists(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); + if (Directory.Exists(cppIncludePath)) + SystemIncludePaths.Add(cppIncludePath); + else + Log.Error($"Missing Clang {ClangVersion} C++ header files location {cppIncludePath}"); var clangLibPath = Path.Combine(ToolsetRoot, "usr", "lib", "clang"); var clangIncludePath = Path.Combine(clangLibPath, ClangVersion.Major.ToString(), "include"); if (!Directory.Exists(clangIncludePath))