Example #1
0
 public ProjectImgui()
     : base(false)
 {
     Name           = "DearImgui";
     SourceRootPath = NetImguiTarget.GetPath(sDefaultPath);
     SourceFilesExcludeRegex.Add(@"backends\.*");
 }
Example #2
0
 public new void ConfigureAll(Configuration conf, NetImguiTarget target)
 {
     base.ConfigureAll(conf, target);
     conf.AddPublicDependency <ProjectImgui>(target);
     conf.IncludePaths.Add(NetImguiTarget.GetPath(ProjectImgui.sDefaultPath));
     conf.IncludePaths.Add(NetImguiTarget.GetPath(@"\Code\Client"));
 }
Example #3
0
 // Add sources files for platform specific Dear ImGui backend (OS/Renderer support)
 public void AddImguiBackendSources()
 {
     SourceFiles.Add(NetImguiTarget.GetPath(ProjectImgui.sDefaultPath) + @"\backends\imgui_impl_dx11.h");
     SourceFiles.Add(NetImguiTarget.GetPath(ProjectImgui.sDefaultPath) + @"\backends\imgui_impl_dx11.cpp");
     SourceFiles.Add(NetImguiTarget.GetPath(ProjectImgui.sDefaultPath) + @"\backends\imgui_impl_win32.h");
     SourceFiles.Add(NetImguiTarget.GetPath(ProjectImgui.sDefaultPath) + @"\backends\imgui_impl_win32.cpp");
 }
Example #4
0
 public ProjectSample(string inName)
     : base(true)
 {
     Name           = inName;
     SourceRootPath = NetImguiTarget.GetPath(@"\Code\Sample\") + Name;
     AdditionalSourceRootPaths.Add(NetImguiTarget.GetPath(@"\Code\Sample\Common"));
     AddImguiBackendSources();
 }
Example #5
0
 public ProjectSample_SingleInclude()
     : base(true)
 {
     Name           = "SampleSingleInclude";
     SourceRootPath = NetImguiTarget.GetPath(@"\Code\Sample\") + Name;
     AdditionalSourceRootPaths.Add(NetImguiTarget.GetPath(@"\Code\Sample\Common"));
     AddImguiBackendSources();
 }
Example #6
0
 public ProjectNetImgui(string imguiFullPath)
     : base(false)
 {
     mVersion       = Path.GetFileName(imguiFullPath);
     mImguiPath     = imguiFullPath;
     Name           = "NetImguiLib (" + mVersion + ")";
     SourceRootPath = NetImguiTarget.GetPath(@"\Code\Client");
     SourceFiles.Add(mImguiPath + @"\imgui.h");
 }
Example #7
0
 public new void ConfigureAll(Configuration conf, NetImguiTarget target)
 {
     base.ConfigureAll(conf, target);
     conf.AddPublicDependency <ProjectImgui>(target);
     conf.AddPublicDependency <ProjectNetImgui_Disabled>(target);
     conf.IncludePaths.Add(NetImguiTarget.GetPath(ProjectImgui.sDefaultPath));
     conf.IncludePaths.Add(NetImguiTarget.GetPath(@"\Code\Client"));
     conf.Defines.Add("NETIMGUI_ENABLED=0");
 }
Example #8
0
        public new void ConfigureAll(Configuration conf, NetImguiTarget target)
        {
            base.ConfigureAll(conf, target);
            conf.AddPublicDependency <ProjectImgui>(target);
            conf.AddPublicDependency <ProjectNetImgui_Default>(target);

            conf.IncludePaths.Add(SourceRootPath + @"\Source");
            conf.IncludePaths.Add(NetImguiTarget.GetPath(ProjectImgui.sDefaultPath));
            conf.IncludePaths.Add(NetImguiTarget.GetPath(@"\Code\Client"));
            conf.EventPostBuild.Add(@"xcopy " + NetImguiTarget.GetPath(@"\Code\ServerApp\Background.png") + " " + conf.TargetPath + " /D /Y");
        }
Example #9
0
 public ProjectNetImguiServer()
     : base(true)
 {
     Name           = "NetImguiServer";
     SourceRootPath = NetImguiTarget.GetPath(@"\Code\ServerApp");
     ResourceFiles.Add(NetImguiTarget.GetPath(@"\Code\ServerApp\small.ico"));
     ResourceFiles.Add(NetImguiTarget.GetPath(@"\Code\ServerApp\netImguiApp.ico"));
     ResourceFiles.Add(NetImguiTarget.GetPath(@"\Code\ServerApp\netImguiApp.rc"));
     ResourceFiles.Add(NetImguiTarget.GetPath(@"\Code\ServerApp\Background.png"));
     SourceFilesBuildExcludeRegex.Add(@".*Code\\ServerApp\\Source\\Fonts\\.*");
     AddImguiBackendSources();
 }
Example #10
0
        public static void ClaimShaderFiles(Project project, string filenameEnding, ShaderProfile shaderProfile, string entryName)
        {
            Strings hlsl_Files = new Strings(project.ResolvedSourceFiles.Where(file => file.EndsWith(filenameEnding, StringComparison.InvariantCultureIgnoreCase)));

            if (hlsl_Files.Count() > 0)
            {
                foreach (ProjConfig conf in project.Configurations)
                {
                    string targetName = conf.Target.Name;
                    string outputDir  = string.Format(@"{0}\{1}_{2}\", NetImguiTarget.GetPath(@"\_generated\Shaders"), project.Name, conf.Target.GetOptimization());
                    conf.IncludePaths.Add(outputDir);
                    foreach (string file in hlsl_Files)
                    {
                        CustomBuildFileHLSL HlslCompileTask = new CustomBuildFileHLSL(conf, targetName, shaderProfile, entryName, outputDir, Project.GetCapitalizedFile(file));
                        project.ResolvedSourceFiles.Add(HlslCompileTask.Output);
                        conf.CustomFileBuildSteps.Add(HlslCompileTask);
                    }
                }
            }
        }
Example #11
0
        public void ConfigureAll(Configuration conf, NetImguiTarget target)
        {
            conf.Name             = @"[target.Compiler]_[target.Optimization]";
            conf.ProjectFileName  = @"[project.Name]";
            conf.TargetFileSuffix = @"_[target.Optimization]";
            conf.ProjectPath      = NetImguiTarget.GetPath(@"\_projects\[target.DevEnv]");
            conf.TargetPath       = NetImguiTarget.GetPath(mIsExe        ? @"\_Bin\[target.DevEnv]_[target.Compiler]_[target.Platform]"
                                                                                                                                                : @"\_generated\Libs\[target.DevEnv]_[target.Compiler]_[target.Platform]");
            conf.IntermediatePath = NetImguiTarget.GetPath(@"\_intermediate\[target.DevEnv]_[target.Compiler]_[target.Platform]_[target.Optimization]\[project.Name]");
            conf.Output           = mIsExe ? Project.Configuration.OutputType.Exe : Project.Configuration.OutputType.Lib;

            conf.IncludePaths.Add(NetImguiTarget.GetPath(ProjectImgui.sDefaultPath) + @"\backends");

            if (target.Compiler == Compiler.Clang)
            {
                conf.Options.Add(Options.Vc.General.PlatformToolset.ClangCL);
            }

            if (mIsExe)
            {
                conf.VcxprojUserFile = new ProjConfig.VcxprojUserFileSettings();
                conf.VcxprojUserFile.LocalDebuggerWorkingDirectory = "$(TargetDir)";
                conf.Options.Add(Options.Vc.Linker.SubSystem.Application);
                conf.LibraryFiles.Add("D3D11.lib");
                conf.IncludePaths.Add(NetImguiTarget.GetPath(@"\Code"));
            }

            conf.Options.Add(Options.Vc.General.WindowsTargetPlatformVersion.Latest);
            conf.Options.Add(Options.Vc.General.TreatWarningsAsErrors.Enable);
            conf.Options.Add(Options.Vc.General.CharacterSet.Unicode);
            conf.Options.Add(Options.Vc.Linker.TreatLinkerWarningAsErrors.Enable);

            conf.Defines.Add("_HAS_EXCEPTIONS=0");             // Prevents error in VisualStudio c++ library with NoExcept, like xlocale

            //conf.Options.Add(new Options.Vc.Compiler.DisableSpecificWarnings(""));
            //conf.Options.Add(Options.Vc.Librarian.TreatLibWarningAsErrors.Enable);	//Note: VisualStudio 2019 doesn't support this option properly
        }
Example #12
0
 public void ConfigureAll(Configuration conf, NetImguiTarget target)
 {
     conf.Name             = "[target.Compiler]_[target.Optimization]";
     conf.SolutionFileName = "[target.DevEnv]_[solution.Name]";
     conf.SolutionPath     = NetImguiTarget.GetPath(@"\_projects");
 }
Example #13
0
 public ProjectNetImgui_Disabled() : base(NetImguiTarget.GetPath(ProjectImgui.sDefaultPath))
 {
     Name = "NetImguiLib (Disabled)";
 }
Example #14
0
 //=============================================================================================
 // PROJECTS
 //=============================================================================================
 // Generate the default Imgui/netImgui Libraries (used to link against with Samples/Server)
 [Sharpmake.Generate] public class ProjectNetImgui_Default : ProjectNetImgui { public ProjectNetImgui_Default() : base(NetImguiTarget.GetPath(ProjectImgui.sDefaultPath))
                                                                               {
                                                                                   Name = "NetImguiLib";
                                                                               }