Browse Source

Added general-purpose compilation options from Embeddinator.

pull/750/head
Joao Matos 9 years ago
parent
commit
73e458cb81
  1. 10
      src/Core/Platform.cs
  2. 30
      src/Generator/Options.cs

10
src/Core/Platform.cs

@ -3,6 +3,16 @@ using System.Runtime.InteropServices; @@ -3,6 +3,16 @@ using System.Runtime.InteropServices;
namespace CppSharp
{
public enum TargetPlatform
{
Windows,
Android,
MacOS,
iOS,
WatchOS,
TVOS
}
public static class Platform
{
public static bool IsWindows

30
src/Generator/Options.cs

@ -8,6 +8,13 @@ using CppSharp.Generators; @@ -8,6 +8,13 @@ using CppSharp.Generators;
namespace CppSharp
{
public enum CompilationTarget
{
SharedLibrary,
StaticLibrary,
Application
}
public class DriverOptions
{
public DriverOptions()
@ -118,6 +125,29 @@ namespace CppSharp @@ -118,6 +125,29 @@ namespace CppSharp
#endregion
#region Compilation options (Embeddinator-specific for now)
/// <summary>
/// Target platform for code compilation.
/// </summary>
public TargetPlatform Platform;
/// <summary>
/// Specifies the VS version.
/// </summary>
/// <remarks>When null, latest is used.</remarks>
public VisualStudioVersion VsVersion;
// If code compilation is enabled, then sets the compilation target.
public CompilationTarget Target;
// If true, will compile the generated as a shared library / DLL.
public bool CompileSharedLibrary => Target == CompilationTarget.SharedLibrary;
// If true, will force the generation of debug metadata for the native
// and managed code.
public bool DebugMode;
#endregion
#region Generator options

Loading…
Cancel
Save