summaryrefslogtreecommitdiffstats
path: root/premake5.lua
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2021-01-17 22:00:49 -0800
committerGitHub <noreply@github.com>2021-01-17 22:00:49 -0800
commit1296c7bb55b14db24308f31cacdda7f7a71fc937 (patch)
tree935ebf1e829361a17f98f5ead3460998719acf42 /premake5.lua
parent2a5d5b32348c33aac7ca62aa9a4c2bb7cff8e08a (diff)
Make `gfx` compile to a DLL. (#1660)
* Make `gfx` compile to a DLL. * Fix cuda * Fix cuda build * Bug gl screen capture bug.
Diffstat (limited to 'premake5.lua')
-rw-r--r--premake5.lua25
1 files changed, 20 insertions, 5 deletions
diff --git a/premake5.lua b/premake5.lua
index 36a7ead0a..211955ae1 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", "graphics-app-framework" }
+ links { "slang", "core", "gfx", "gfx-util", "graphics-app-framework" }
end
--
@@ -698,7 +698,7 @@ toolSharedLibrary "render-test"
uuid "61F7EB00-7281-4BF3-9470-7C2EA92620C3"
includedirs { ".", "external", "source", "tools/gfx", "tools/graphics-app-framework" }
- links { "core", "slang", "gfx", "graphics-app-framework" }
+ links { "core", "slang", "gfx", "gfx-util", "graphics-app-framework" }
if isTargetWindows then
addSourceDir "tools/render-test/windows"
@@ -717,7 +717,7 @@ toolSharedLibrary "render-test"
defines { "RENDER_TEST_CUDA" }
includedirs { cudaPath .. "/include" }
includedirs { cudaPath .. "/include", cudaPath .. "/common/inc" }
-
+ links { "cuda", "cudart" }
if optixPath then
defines { "RENDER_TEST_OPTIX" }
includedirs { optixPath .. "include/" }
@@ -739,9 +739,12 @@ tool "gfx"
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"
+ kind "SharedLib"
+ links { "core", "slang" }
pic "On"
-
+
+ defines { "SLANG_GFX_DYNAMIC", "SLANG_GFX_DYNAMIC_EXPORT" }
+
includedirs { ".", "external", "source" }
-- Will compile across targets
@@ -809,6 +812,18 @@ tool "gfx"
end
--
+-- `gfx-util` is a static library containing utilities and helpers for using
+-- the `gfx` library.
+--
+tool "gfx-util"
+ uuid "F5ADB74E-02A7-44FB-AA3B-FC02F8AC7A4B"
+ kind "StaticLib"
+ pic "On"
+
+ includedirs { ".", "source" }
+
+ addSourceDir "tools/gfx-util"
+--
-- `graphics-app-framework` contains all the utils for a simple graphics application.
--
tool "graphics-app-framework"