diff options
| author | Yong He <yonghe@outlook.com> | 2020-12-11 09:42:23 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-11 09:42:23 -0800 |
| commit | 856d7d3705cedabcc2e9389a3f0ac730b0e33476 (patch) | |
| tree | 3b04a7c67f9e4b4b4cc3bb4a0906815c62f7d7ee /premake5.lua | |
| parent | 992778e25c444932921ce92fe7934893b2aca35f (diff) | |
Implements CUDA renderer in gfx. (#1637)
* Implements CUDA renderer in gfx.
* Revert unnecessary change.
* Revert unnecessary changes.
Co-authored-by: Tim Foley <tfoleyNV@users.noreply.github.com>
Diffstat (limited to 'premake5.lua')
| -rw-r--r-- | premake5.lua | 20 |
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 |
