summaryrefslogtreecommitdiffstats
path: root/premake5.lua
diff options
context:
space:
mode:
Diffstat (limited to 'premake5.lua')
-rw-r--r--premake5.lua20
1 files changed, 16 insertions, 4 deletions
diff --git a/premake5.lua b/premake5.lua
index 801847cde..588caaf79 100644
--- a/premake5.lua
+++ b/premake5.lua
@@ -723,8 +723,6 @@ toolSharedLibrary "render-test"
includedirs { optixPath .. "include/" }
end
- links { "cuda", "cudart" }
-
filter { "platforms:x86" }
libdirs { cudaPath .. "/lib/Win32/" }
@@ -767,9 +765,23 @@ tool "gfx"
addSourceDir "tools/gfx/d3d"
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" }
+ includedirs { cudaPath .. "/include" }
+ includedirs { cudaPath .. "/include", cudaPath .. "/common/inc" }
+ if optixPath then
+ defines { "GFX_OPTIX" }
+ includedirs { optixPath .. "include/" }
+ end
+ links { "cuda", "cudart" }
+ filter { "platforms:x86" }
+ libdirs { cudaPath .. "/lib/Win32/" }
+ filter { "platforms:x64" }
+ libdirs { cudaPath .. "/lib/x64/" }
+ end
elseif targetDetail == "mingw" or targetDetail == "cygwin" then
-- Don't support any render techs...
elseif os.target() == "macosx" then