Refactor CoreCLR runtime into explicit dotnet api instead of mocking mono api
Required by platforms that will use mono under the hood for .Net 7 New `USE_CSHARP` define for C# ability Engine doesn't use `mono_*` apis directly but via MCore/MClass/MMethod/ apis
This commit is contained in:
@@ -62,20 +62,6 @@ namespace Flax.Build
|
||||
|
||||
// Add include paths for this project sources and engine third-party sources
|
||||
var depsRoot = options.DepsFolder;
|
||||
{
|
||||
// TODO: rethink how we should expose mono (and dotnet host api) in general
|
||||
DotNetSdk.Instance.GetHostRuntime(options.Platform.Target, options.Architecture, out var hostRuntime);
|
||||
if (hostRuntime.Type == DotNetSdk.HostType.Mono)
|
||||
{
|
||||
// Use mono headers from the host runtime
|
||||
options.CompileEnv.IncludePaths.Add(Path.Combine(hostRuntime.Path, "include", "mono-2.0"));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Use in-built mono headers
|
||||
options.CompileEnv.IncludePaths.Add(Path.Combine(Globals.EngineRoot, @"Source\ThirdParty\mono-2.0"));
|
||||
}
|
||||
}
|
||||
options.CompileEnv.IncludePaths.Add(Path.Combine(Globals.EngineRoot, @"Source\ThirdParty"));
|
||||
options.LinkEnv.LibraryPaths.Add(depsRoot);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user