diff options
Diffstat (limited to 'premake5.lua')
| -rw-r--r-- | premake5.lua | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/premake5.lua b/premake5.lua index 9bb41e71b..2953922b2 100644 --- a/premake5.lua +++ b/premake5.lua @@ -266,6 +266,8 @@ end -- example "hello" uuid "E6385042-1649-4803-9EBD-168F8B7EF131" + includedirs { ".", "tools" } + links { "core", "slang-graphics" } -- -- Note how we are calling our custom `example()` subroutine with -- the same syntax sugar that Premake usually advocates for their @@ -300,7 +302,6 @@ standardProject "core" warnings "Extra" flags { "FatalWarnings" } - -- -- `slang-generate` is a tool we use for source code generation on -- the compiler. It depends on the `core` library, so we need to @@ -363,8 +364,31 @@ tool "slang-eval-test" tool "render-test" uuid "96610759-07B9-4EEB-A974-5C634A2E742B" + includedirs { ".", "external", "source", "tools/slang-graphics" } + links { "core", "slang", "slang-graphics" } + filter { "system:windows" } + + systemversion "10.0.14393.0" + + -- For Windows targets, we want to copy d3dcompiler_47.dll, + -- dxcompiler.dll, and dxil.dll from the Windows SDK redistributable + -- directory into the output directory. + postbuildcommands { '"$(SolutionDir)tools\\copy-hlsl-libs.bat" "$(WindowsSdkDir)Redist/D3D/%{cfg.platform:lower()}/" "%{cfg.targetdir}/"'} + +-- +-- `slang-graphics` is a utility library for doing GPU rendering +-- and compute, which is used by both our testing and exmaples. +-- It depends on teh `core` library, so we need to declare that: +-- + +tool "slang-graphics" + uuid "222F7498-B40C-4F3F-A704-DDEB91A4484A" + -- Unlike most of the code under `tools/`, this is a library + -- rather than a stand-alone executable. + kind "StaticLib" + includedirs { ".", "external", "source" } - links { "core", "slang" } + filter { "system:windows" } systemversion "10.0.14393.0" @@ -374,6 +398,8 @@ tool "render-test" -- directory into the output directory. postbuildcommands { '"$(SolutionDir)tools\\copy-hlsl-libs.bat" "$(WindowsSdkDir)Redist/D3D/%{cfg.platform:lower()}/" "%{cfg.targetdir}/"'} + + -- -- The `slangc` command-line application is just a very thin wrapper -- around the Slang dynamic library, so its build is extermely simple. |
