diff options
| author | Yong He <yonghe@outlook.com> | 2021-01-06 12:58:57 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-06 12:58:57 -0800 |
| commit | 92636513abe72d2da0c45f0e2c1235415e0671c3 (patch) | |
| tree | 234136e9d89006df9d6775e8bcd07e91ae344af7 /premake5.lua | |
| parent | 706d4f91e269d473c963d31792fb2c8320933c9b (diff) | |
Refactor GUI/Window utils out of gfx library (#1649)
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'premake5.lua')
| -rw-r--r-- | premake5.lua | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/premake5.lua b/premake5.lua index 136b7741e..6fd2788a5 100644 --- a/premake5.lua +++ b/premake5.lua @@ -525,7 +525,7 @@ function example(name) -- and the `gfx` abstraction layer (which in turn -- depends on the `core` library). We specify all of that here, -- rather than in each example. - links { "slang", "core", "gfx" } + links { "slang", "core", "gfx", "graphics-app-framework" } end -- @@ -697,8 +697,8 @@ toolSharedLibrary "slang-reflection-test" toolSharedLibrary "render-test" uuid "61F7EB00-7281-4BF3-9470-7C2EA92620C3" - includedirs { ".", "external", "source", "tools/gfx" } - links { "core", "slang", "gfx" } + includedirs { ".", "external", "source", "tools/gfx", "tools/graphics-app-framework" } + links { "core", "slang", "gfx", "graphics-app-framework" } if isTargetWindows then addSourceDir "tools/render-test/windows" @@ -732,9 +732,7 @@ toolSharedLibrary "render-test" end -- --- `gfx` 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: +-- `gfx` is a abstraction layer for different GPU platforms. -- tool "gfx" @@ -744,7 +742,7 @@ tool "gfx" kind "StaticLib" pic "On" - includedirs { ".", "external", "source", "external/imgui" } + includedirs { ".", "external", "source" } -- Will compile across targets addSourceDir "tools/gfx/nvapi" @@ -766,7 +764,6 @@ tool "gfx" addSourceDir "tools/gfx/d3d11" addSourceDir "tools/gfx/d3d12" addSourceDir "tools/gfx/cuda" - addSourceDir "tools/gfx/windows" if type(cudaPath) == "string" then defines { "GFX_ENABLE_CUDA" } @@ -791,7 +788,6 @@ tool "gfx" --addSourceDir "tools/gfx/vulkan" --addSourceDir "tools/gfx/open-gl" end - -- If NVAPI is enabled if enableNvapi then @@ -811,8 +807,25 @@ tool "gfx" links { "nvapi64" } end + +-- +-- `graphics-app-framework` contains all the utils for a simple graphics application. +-- +tool "graphics-app-framework" + uuid "3565fe5e-4fa3-11eb-ae93-0242ac130002" + kind "StaticLib" + pic "On" - + includedirs { ".", "external", "source", "external/imgui", "tools/gfx" } + + addSourceDir "tools/graphics-app-framework" + + -- Include windowing support on Windows. + if isTargetWindows then + systemversion "10.0.14393.0" + addSourceDir "tools/graphics-app-framework/windows" + end + -- -- The `slangc` command-line application is just a very thin wrapper -- around the Slang dynamic library, so its build is extermely simple. |
