Skip to content

Instantly share code, notes, and snippets.

@fleth
Last active April 15, 2017 18:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fleth/44c8bc15eb932e218ec8982daa87905a to your computer and use it in GitHub Desktop.
Save fleth/44c8bc15eb932e218ec8982daa87905a to your computer and use it in GitHub Desktop.
using CppSharp;
using CppSharp.AST;
using CppSharp.Generators;
namespace LibMuseCppSharp
{
class MuseLibrary : ILibrary
{
public void Postprocess(Driver driver, ASTContext ctx)
{
}
public void Preprocess(Driver driver, ASTContext ctx)
{
}
public void Setup(Driver driver)
{
var options = driver.Options;
options.GeneratorKind = GeneratorKind.CSharp;
var module = options.AddModule("LibMuse");
module.IncludeDirs.Add("C:/libmuse_6.0.0/windows/include");
module.Headers.Add("muse.h");
module.LibraryDirs.Add("C:/libmuse_6.0.0/windows/lib/release/x64");
module.Libraries.Add("libmuse-uwp.lib");
options.OutputDir = "C:/libmuse_6.0.0";
}
public void SetupPasses(Driver driver)
{
}
}
}
using CppSharp;
namespace LibMuseCppSharp
{
class Program
{
static void Main(string[] args)
{
ConsoleDriver.Run(new MuseLibrary());
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment