diff --git a/src/Generator/Generators/CLI/CLITypeReferences.cs b/src/Generator/Generators/CLI/CLITypeReferences.cs index 337bded4..ffabdea4 100644 --- a/src/Generator/Generators/CLI/CLITypeReferences.cs +++ b/src/Generator/Generators/CLI/CLITypeReferences.cs @@ -113,9 +113,9 @@ namespace CppSharp.Generators.CLI var translationUnit = decl.Namespace.TranslationUnit; if (translationUnit.IsSystemHeader) - return; - - if(!decl.IsDeclared) + return; + + if (!decl.IsGenerated) return; if(IsBuiltinTypedef(decl)) @@ -139,9 +139,6 @@ namespace CppSharp.Generators.CLI private string GetIncludePath(TranslationUnit translationUnit) { - if (!translationUnit.IsGenerated) - return DriverOptions.NoGenIncludePrefix + translationUnit.FileRelativePath; - if (!DriverOptions.UseHeaderDirectories) return translationUnit.FileName; diff --git a/src/Generator/Options.cs b/src/Generator/Options.cs index 8f606e35..8b0a6433 100644 --- a/src/Generator/Options.cs +++ b/src/Generator/Options.cs @@ -112,15 +112,14 @@ namespace CppSharp /// public bool GeneratePropertiesAdvanced; - //List of include directories that are used but not generated - public List NoGenIncludeDirs; - public string NoGenIncludePrefix = ""; - + //List of include directories that are used but not generated + public List NoGenIncludeDirs; + /// /// Wether the generated C# code should be automatically compiled. /// public bool CompileCode; - + /// /// Enable this option to enable generation of finalizers. /// Works in both CLI and C# backends.