diff options
| -rw-r--r-- | xmake/rules/cuda/env/xmake.lua | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/xmake/rules/cuda/env/xmake.lua b/xmake/rules/cuda/env/xmake.lua index af6810d10..876b85ad7 100644 --- a/xmake/rules/cuda/env/xmake.lua +++ b/xmake/rules/cuda/env/xmake.lua @@ -23,9 +23,16 @@ rule("cuda.env") -- before load before_load(function (target) - - -- find cuda - -- TODO - print("find cuda..") + if not target:data("cuda") then + local cuda = get_config("cuda") + if not cuda then + -- TODO improve find_cuda + cache + local toolchain = import("detect.sdks.find_cuda")() + if toolchain then + cuda = toolchain.cudadir + end + end + target:data_set("cuda", assert(find_qt(nil, {verbose = true}), "Qt SDK not found!")) + end end) |
