yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Ellie Hermaszewskaformatf65d756bf

master
1.3 KiB43 linesraw
1#ifndef SLANG_WIN_VISUAL_STUDIO_UTIL_H
2#define SLANG_WIN_VISUAL_STUDIO_UTIL_H
3
4#include "../../core/slang-list.h"
5#include "../../core/slang-process-util.h"
6#include "../../core/slang-string.h"
7#include "../slang-downstream-compiler-util.h"
8
9namespace Slang
10{
11
12struct WinVisualStudioUtil
13{
14    struct VersionPath
15    {
16        SemanticVersion version; ///< The visual studio version
17        String vcvarsPath; ///< The path to `vcvars.bat` files, that need to be executed before
18                           ///< executing the compiler
19    };
20
21    ///  Find all the installations
22    static SlangResult find(List<VersionPath>& outVersionPaths);
23
24    /// Find and add to the set (if not already there)
25    static SlangResult find(DownstreamCompilerSet* set);
26
27    /// Create the cmdLine to start compiler for specified path
28    static void calcExecuteCompilerArgs(const VersionPath& versionPath, CommandLine& outCmdLine);
29
30    /// Run visual studio on specified path with the parameters specified on the command line.
31    /// Output placed in outResult.
32    static SlangResult executeCompiler(
33        const VersionPath& versionPath,
34        const CommandLine& commandLine,
35        ExecuteResult& outResult);
36
37    /// Gets the msc compiler used to compile this version.
38    static DownstreamCompilerMatchVersion getCompiledVersion();
39};
40
41} // namespace Slang
42
43#endif