summaryrefslogtreecommitdiff
path: root/xmake/modules/detect
diff options
context:
space:
mode:
authorruki <[email protected]>2020-09-25 00:44:21 +0800
committerruki <[email protected]>2020-09-25 00:44:21 +0800
commitba3a8eba461121eed5028f3e1f5c426fda348637 (patch)
treeb338a35461ad31cbf21ed5442f39eb5a25ddf887 /xmake/modules/detect
parent38ba8f1dac4395c5c1b6d3e4091529079c409ab6 (diff)
fix typo for some internal pathes
Diffstat (limited to 'xmake/modules/detect')
-rw-r--r--xmake/modules/detect/sdks/find_cuda.lua16
-rw-r--r--xmake/modules/detect/sdks/find_qt.lua18
-rw-r--r--xmake/modules/detect/sdks/find_vcpkgdir.lua8
-rw-r--r--xmake/modules/detect/sdks/find_vstudio.lua24
4 files changed, 33 insertions, 33 deletions
diff --git a/xmake/modules/detect/sdks/find_cuda.lua b/xmake/modules/detect/sdks/find_cuda.lua
index 78a08f9bf..6cc37995c 100644
--- a/xmake/modules/detect/sdks/find_cuda.lua
+++ b/xmake/modules/detect/sdks/find_cuda.lua
@@ -29,21 +29,21 @@ import("core.project.config")
function _find_sdkdir()
-- init the search directories
- local pathes = {}
+ local paths = {}
if os.host() == "macosx" then
- table.insert(pathes, "/Developer/NVIDIA/CUDA/bin")
- table.insert(pathes, "/Developer/NVIDIA/CUDA*/bin")
+ table.insert(paths, "/Developer/NVIDIA/CUDA/bin")
+ table.insert(paths, "/Developer/NVIDIA/CUDA*/bin")
elseif os.host() == "windows" then
- table.insert(pathes, "$(env CUDA_PATH)/bin")
+ table.insert(paths, "$(env CUDA_PATH)/bin")
else
-- find from default symbol link dir
- table.insert(pathes, "/usr/local/cuda/bin")
- table.insert(pathes, "/usr/local/cuda*/bin")
+ table.insert(paths, "/usr/local/cuda/bin")
+ table.insert(paths, "/usr/local/cuda*/bin")
end
- table.insert(pathes, "$(env PATH)")
+ table.insert(paths, "$(env PATH)")
-- attempt to find nvcc
- local nvcc = find_file(os.host() == "windows" and "nvcc.exe" or "nvcc", pathes)
+ local nvcc = find_file(os.host() == "windows" and "nvcc.exe" or "nvcc", paths)
if nvcc then
return path.directory(path.directory(nvcc))
end
diff --git a/xmake/modules/detect/sdks/find_qt.lua b/xmake/modules/detect/sdks/find_qt.lua
index 144cbdff0..f3ba95582 100644
--- a/xmake/modules/detect/sdks/find_qt.lua
+++ b/xmake/modules/detect/sdks/find_qt.lua
@@ -70,13 +70,13 @@ function _find_sdkdir(sdkdir, sdkver)
table.insert(subdirs, "bin")
-- init the search directories
- local pathes = {}
+ local paths = {}
if sdkdir then
- table.insert(pathes, sdkdir)
+ table.insert(paths, sdkdir)
end
if is_host("windows") then
- -- add pathes from registry
+ -- add paths from registry
local regs =
{
"HKEY_CLASSES_ROOT\\Applications\\QtProject.QtCreator.c\\shell\\Open\\Command",
@@ -85,7 +85,7 @@ function _find_sdkdir(sdkdir, sdkver)
"HKEY_CURRENT_USER\\SOFTWARE\\Classes\\Applications\\QtProject.QtCreator.cpp\\shell\\Open\\Command"
}
for _, reg in ipairs(regs) do
- table.insert(pathes, function ()
+ table.insert(paths, function ()
local value = val("reg " .. reg)
if value then
local p = value:find("\\Tools\\QtCreator", 1, true)
@@ -99,18 +99,18 @@ function _find_sdkdir(sdkdir, sdkver)
-- add root logical drive pates, e.g. C:/Qt/Qtx.x.x, D:/Qtx.x.x ..
for idx, drive in ipairs(winos.logical_drives()) do
if idx < 5 then
- table.insert(pathes, path.join(drive, "Qt", "Qt*"))
+ table.insert(paths, path.join(drive, "Qt", "Qt*"))
else
break
end
end
else
- table.insert(pathes, "~/Qt")
- table.insert(pathes, "~/Qt*")
+ table.insert(paths, "~/Qt")
+ table.insert(paths, "~/Qt*")
end
-- attempt to find qmake
- local qmake = find_file(is_host("windows") and "qmake.exe" or "qmake", pathes, {suffixes = subdirs})
+ local qmake = find_file(is_host("windows") and "qmake.exe" or "qmake", paths, {suffixes = subdirs})
if qmake then
return path.directory(path.directory(qmake))
end
@@ -123,7 +123,7 @@ function _find_qmake(sdkdir, sdkver)
sdkdir = _find_sdkdir(sdkdir, sdkver)
-- get the bin directory
- local qmake = find_tool("qmake", {pathes = sdkdir and path.join(sdkdir, "bin")})
+ local qmake = find_tool("qmake", {paths = sdkdir and path.join(sdkdir, "bin")})
if qmake then
return qmake.program
end
diff --git a/xmake/modules/detect/sdks/find_vcpkgdir.lua b/xmake/modules/detect/sdks/find_vcpkgdir.lua
index e6445e66d..de8cba24e 100644
--- a/xmake/modules/detect/sdks/find_vcpkgdir.lua
+++ b/xmake/modules/detect/sdks/find_vcpkgdir.lua
@@ -29,9 +29,9 @@ import("core.project.config")
function _find_vcpkgdir(sdkdir)
-- init the search directories
- local pathes = {}
+ local paths = {}
if sdkdir then
- table.insert(pathes, sdkdir)
+ table.insert(paths, sdkdir)
end
if is_host("windows") then
-- attempt to read path info after running `vcpkg integrate install`
@@ -39,7 +39,7 @@ function _find_vcpkgdir(sdkdir)
if os.isfile(pathfile) then
local dir = io.readfile(pathfile):trim()
if os.isdir(dir) then
- table.insert(pathes, dir)
+ table.insert(paths, dir)
end
end
else
@@ -47,7 +47,7 @@ function _find_vcpkgdir(sdkdir)
end
-- attempt to find vcpkg
- local vcpkg = find_file(is_host("windows") and "vcpkg.exe" or "vcpkg", pathes)
+ local vcpkg = find_file(is_host("windows") and "vcpkg.exe" or "vcpkg", paths)
if vcpkg then
return path.directory(vcpkg)
end
diff --git a/xmake/modules/detect/sdks/find_vstudio.lua b/xmake/modules/detect/sdks/find_vstudio.lua
index c9cb7589d..369b4e98d 100644
--- a/xmake/modules/detect/sdks/find_vstudio.lua
+++ b/xmake/modules/detect/sdks/find_vstudio.lua
@@ -211,13 +211,13 @@ function main(opt)
end
-- find vcvarsall.bat or vcvars32.bat
- local pathes =
+ local paths =
{
path.join(VCInstallDir, "Auxiliary", "Build"),
path.join(VCInstallDir, "bin"),
VCInstallDir
}
- local vcvarsall = find_file("vcvarsall.bat", pathes) or find_file("vcvars32.bat", pathes)
+ local vcvarsall = find_file("vcvarsall.bat", paths) or find_file("vcvars32.bat", paths)
if vcvarsall and os.isfile(vcvarsall) then
-- load vcvarsall
@@ -250,8 +250,8 @@ function main(opt)
end
end
- -- init pathes
- local pathes =
+ -- init paths
+ local paths =
{
format("$(reg HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VS7;%s)\\VC", version),
format("$(reg HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VS7;%s)\\VC7\\bin", version),
@@ -260,24 +260,24 @@ function main(opt)
format("$(reg HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VS7;%s)\\VC\\Auxiliary\\Build", version)
}
if vsenvs[version] then
- table.insert(pathes, format("$(env %s)\\..\\..\\VC", vsenvs[version]))
+ table.insert(paths, format("$(env %s)\\..\\..\\VC", vsenvs[version]))
end
if vswhere_VCAuxiliaryBuildDir and os.isdir(vswhere_VCAuxiliaryBuildDir) then
- table.insert(pathes, vswhere_VCAuxiliaryBuildDir)
+ table.insert(paths, vswhere_VCAuxiliaryBuildDir)
end
- -- find vs from some logical drives pathes
+ -- find vs from some logical drives paths
for _, logical_drive in ipairs(winos.logical_drives()) do
if os.isdir(path.join(logical_drive, "Program Files (x86)")) then
- table.insert(pathes, path.join(logical_drive, "Program Files (x86)", "Microsoft Visual Studio", vsvers[version], "*", "VC", "Auxiliary", "Build"))
- table.insert(pathes, path.join(logical_drive, "Program Files (x86)", "Microsoft Visual Studio " .. version, "VC"))
+ table.insert(paths, path.join(logical_drive, "Program Files (x86)", "Microsoft Visual Studio", vsvers[version], "*", "VC", "Auxiliary", "Build"))
+ table.insert(paths, path.join(logical_drive, "Program Files (x86)", "Microsoft Visual Studio " .. version, "VC"))
end
- table.insert(pathes, path.join(logical_drive, "Program Files", "Microsoft Visual Studio", vsvers[version], "*", "VC", "Auxiliary", "Build"))
- table.insert(pathes, path.join(logical_drive, "Program Files", "Microsoft Visual Studio " .. version, "VC"))
+ table.insert(paths, path.join(logical_drive, "Program Files", "Microsoft Visual Studio", vsvers[version], "*", "VC", "Auxiliary", "Build"))
+ table.insert(paths, path.join(logical_drive, "Program Files", "Microsoft Visual Studio " .. version, "VC"))
end
-- find vcvarsall.bat, vcvars32.bat for vs7.1
- local vcvarsall = find_file("vcvarsall.bat", pathes) or find_file("vcvars32.bat", pathes)
+ local vcvarsall = find_file("vcvarsall.bat", paths) or find_file("vcvars32.bat", paths)
if vcvarsall then
-- load vcvarsall