public ProjectBase(bool isExe) : base(typeof(NetImguiTarget)) { //AddTargets(new NetImguiTarget{}, new NetImguiTarget{DevEnv=DevEnv.vs2017, Compiler = Compiler.VS}); AddTargets(new NetImguiTarget { }); CustomBuildFileHLSL.AddFilesExt(this); IsFileNameToLower = false; IsTargetFileNameToLower = false; mIsExe = isExe; }
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); } } } }
protected override void ExcludeOutputFiles() { base.ExcludeOutputFiles(); CustomBuildFileHLSL.ClaimAllShaderFiles(this); }