From f88b34a15f47cd3d60ce8dfe11f7ff667e1a7713 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Sun, 21 Nov 2021 14:03:10 +0100 Subject: [PATCH] Fix monolithic target build with native code module used by referenced plugin --- Source/Tools/Flax.Build/Build/ProjectTarget.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Source/Tools/Flax.Build/Build/ProjectTarget.cs b/Source/Tools/Flax.Build/Build/ProjectTarget.cs index 4aa30fe03..50c746c4e 100644 --- a/Source/Tools/Flax.Build/Build/ProjectTarget.cs +++ b/Source/Tools/Flax.Build/Build/ProjectTarget.cs @@ -64,7 +64,6 @@ namespace Flax.Build var depsRoot = options.DepsFolder; options.CompileEnv.IncludePaths.Add(Path.Combine(Globals.EngineRoot, @"Source\ThirdParty\mono-2.0")); // TODO: let mono module expose it options.CompileEnv.IncludePaths.Add(Path.Combine(Globals.EngineRoot, @"Source\ThirdParty")); - options.CompileEnv.IncludePaths.Add(Path.Combine(Project.ProjectFolderPath, "Source")); options.LinkEnv.LibraryPaths.Add(depsRoot); // Ensure to propagate no-C# scripting define to the whole codebase @@ -73,10 +72,10 @@ namespace Flax.Build options.CompileEnv.PreprocessorDefinitions.Add("COMPILE_WITHOUT_CSHARP"); } - // Add include paths for referenced projects sources - foreach (var reference in Project.References) + // Add include paths for this and all referenced projects sources + foreach (var project in Project.GetAllProjects()) { - options.CompileEnv.IncludePaths.Add(Path.Combine(reference.Project.ProjectFolderPath, "Source")); + options.CompileEnv.IncludePaths.Add(Path.Combine(project.ProjectFolderPath, "Source")); } } }