Fixed the issue where OptiX could not correctly find the specified ve… (#5588)

Co-authored-by: youwen.zhuang <youwen.zhuang@mthreads.com>
pull/4570/merge
Xdestiny 1 month ago committed by GitHub
parent b62d3d297f
commit e328ef3c5c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      packages/o/optix/xmake.lua

@ -6,11 +6,14 @@ package("optix")
on_fetch(function (package, opt)
if opt.system then
import("lib.detect.find_path")
import("core.base.semver")
local paths = {"$(env OptiX_ROOT)"}
if package:is_plat("windows") then
for _, dir in ipairs(os.dirs("$(env PROGRAMDATA)/NVIDIA Corporation/OptiX SDK *.*.*")) do
table.insert(paths, dir)
if package:version_str() == "latest" or semver.satisfies(dir:match("OptiX SDK (%d+%.%d+%.%d+)"), package:version_str()) then
table.insert(paths, dir)
end
end
end

Loading…
Cancel
Save