diff options
| author | ruki <[email protected]> | 2022-04-22 00:43:54 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-04-22 00:43:54 +0800 |
| commit | 567d04c515cb241e8ca0caff53dcb4e31f4688b9 (patch) | |
| tree | 49707b27b6a9be01685c724fa45f5f16068e2507 /xmake/plugins | |
| parent | db869ffcdefc0fcbc97e9cea61ac21718ae4e2d4 (diff) | |
fix cuda for vs
Diffstat (limited to 'xmake/plugins')
| -rw-r--r-- | xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua | 2 | ||||
| -rw-r--r-- | xmake/plugins/project/vstudio/impl/vs201x_vcxproj_filters.lua | 4 | ||||
| -rw-r--r-- | xmake/plugins/project/vsxmake/getinfo.lua | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua b/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua index b00b36750..cf91115b4 100644 --- a/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua +++ b/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua @@ -46,7 +46,7 @@ end function _check_cuda(target) local cuda for _, targetinfo in ipairs(target.info) do - if table.contains(targetinfo.sourcekinds, "cu") then + if targetinfo.sourcekinds and table.contains(targetinfo.sourcekinds, "cu") then cuda = find_cuda() break end diff --git a/xmake/plugins/project/vstudio/impl/vs201x_vcxproj_filters.lua b/xmake/plugins/project/vstudio/impl/vs201x_vcxproj_filters.lua index b8dc48534..b26bea68e 100644 --- a/xmake/plugins/project/vstudio/impl/vs201x_vcxproj_filters.lua +++ b/xmake/plugins/project/vstudio/impl/vs201x_vcxproj_filters.lua @@ -85,10 +85,10 @@ function _make_filter(filepath, target, vcxprojdir) filepattern = path.pattern(path.translate(filepattern)) if fileitem:match(filepattern) then if mode == "plain" then - filter = path.translate(filegroup) + filter = path.normalize(filegroup) else -- file tree mode (default) - filter = path.join(filegroup, path.directory(fileitem)) + filter = path.normalize(path.join(filegroup, path.directory(fileitem))) end if filter and filter == '.' then filter = nil diff --git a/xmake/plugins/project/vsxmake/getinfo.lua b/xmake/plugins/project/vsxmake/getinfo.lua index a6f5e1aaa..60445a106 100644 --- a/xmake/plugins/project/vsxmake/getinfo.lua +++ b/xmake/plugins/project/vsxmake/getinfo.lua @@ -363,10 +363,10 @@ function _make_filter(filepath, target, vcxprojdir) filepattern = path.pattern(path.translate(filepattern)) if fileitem:match(filepattern) then if mode == "plain" then - filter = path.translate(filegroup) + filter = path.normalize(filegroup) else -- file tree mode (default) - filter = path.join(filegroup, path.directory(fileitem)) + filter = path.normalize(path.join(filegroup, path.directory(fileitem))) end if filter and filter == '.' then filter = nil |
