Browse Source

Merge pull request #1027 from rokups/feature/referenced-assemblies

Add ability for managed module wrapper to reference extra assemblies.
pull/1028/head
João Matos 8 years ago committed by GitHub
parent
commit
50fa937ba8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      src/AST/Module.cs
  2. 2
      src/Generator/Driver.cs

1
src/AST/Module.cs

@ -14,6 +14,7 @@ namespace CppSharp.AST
public string OutputNamespace { get; set; } public string OutputNamespace { get; set; }
public List<TranslationUnit> Units { get; } = new List<TranslationUnit>(); public List<TranslationUnit> Units { get; } = new List<TranslationUnit>();
public List<string> CodeFiles { get; } = new List<string>(); public List<string> CodeFiles { get; } = new List<string>();
public List<string> ReferencedAssemblies { get; } = new List<string>();
public List<Module> Dependencies { get; } = new List<Module>(); public List<Module> Dependencies { get; } = new List<Module>();
[Obsolete("Use Module(string libraryName) instead.")] [Obsolete("Use Module(string libraryName) instead.")]

2
src/Generator/Driver.cs

@ -357,6 +357,8 @@ namespace CppSharp
where libraryMappings.ContainsKey(dependency) where libraryMappings.ContainsKey(dependency)
select libraryMappings[dependency]).ToArray()); select libraryMappings[dependency]).ToArray());
compilerParameters.ReferencedAssemblies.AddRange(module.ReferencedAssemblies.ToArray());
Diagnostics.Message($"Compiling {module.LibraryName}..."); Diagnostics.Message($"Compiling {module.LibraryName}...");
CompilerResults compilerResults; CompilerResults compilerResults;
using (var codeProvider = new CSharpCodeProvider( using (var codeProvider = new CSharpCodeProvider(

Loading…
Cancel
Save