diff --git a/examples/OpenCV/OpenCV.cs b/examples/OpenCV/OpenCV.cs new file mode 100644 index 00000000..c1ff8e5a --- /dev/null +++ b/examples/OpenCV/OpenCV.cs @@ -0,0 +1,59 @@ +using Cxxi.Generators; +using Cxxi.Passes; + +namespace Cxxi +{ + class OpenCV : ILibrary + { + public void Setup(DriverOptions options) + { + options.LibraryName = "OpenCV"; + options.Headers.Add("opencv.hpp"); + options.IncludeDirs.Add("../../../examples/OpenCV/opencv/include/"); + options.IncludeDirs.Add("../../../examples/OpenCV/opencv/include/opencv2"); + options.IncludeDirs.Add("../../../examples/OpenCV/opencv/modules/core/include"); + options.IncludeDirs.Add("../../../examples/OpenCV/opencv/modules/flann/include"); + options.IncludeDirs.Add("../../../examples/OpenCV/opencv/modules/imgproc/include"); + options.IncludeDirs.Add("../../../examples/OpenCV/opencv/modules/photo/include"); + options.IncludeDirs.Add("../../../examples/OpenCV/opencv/modules/video/include"); + options.IncludeDirs.Add("../../../examples/OpenCV/opencv/modules/features2d/include"); + options.IncludeDirs.Add("../../../examples/OpenCV/opencv/modules/objdetect/include"); + options.IncludeDirs.Add("../../../examples/OpenCV/opencv/modules/calib3d/include"); + options.IncludeDirs.Add("../../../examples/OpenCV/opencv/modules/ml/include"); + options.IncludeDirs.Add("../../../examples/OpenCV/opencv/modules/highgui/include"); + options.IncludeDirs.Add("../../../examples/OpenCV/opencv/modules/contrib/include"); + options.OutputDir = "opencv"; + } + + public void Preprocess(Library lib) + { + + } + + public void Postprocess(Library lib) + { + + } + + public void SetupPasses(Driver driver, PassBuilder p) + { + + } + + public void GenerateStart(TextTemplate template) + { + } + + public void GenerateAfterNamespaces(TextTemplate template) + { + } + + static class Program + { + public static void Main(string[] args) + { + Driver.Run(new OpenCV()); + } + } + } +} diff --git a/examples/OpenCV/premake4.lua b/examples/OpenCV/premake4.lua new file mode 100644 index 00000000..8f96dbc7 --- /dev/null +++ b/examples/OpenCV/premake4.lua @@ -0,0 +1,25 @@ +project "OpenCV" + + kind "ConsoleApp" + language "C#" + location "." + debugdir "." + + files { "OpenCV.cs", "./*.lua" } + + links { "Bridge", "Generator", "Parser" } + + +project "OpenCV.Tests" + + kind "ConsoleApp" + language "C#" + location "." + + dependson "OpenCV" + + files + { + libdir .. "/OpenCV/OpenCV.cs", + "*.lua" + }