summaryrefslogtreecommitdiff
path: root/xmake/modules/detect
diff options
context:
space:
mode:
authorcharles seizilles <[email protected]>2022-09-12 18:28:27 +0200
committercharles seizilles <[email protected]>2022-09-12 18:28:27 +0200
commitc8768fc11f3ecedfcebec4ac36a20f4e76355098 (patch)
tree7754249a25d0988ae306614878d6da9f838542ec /xmake/modules/detect
parent1bf418b749afd4abaeaf36574569e6ac4fc4b8d9 (diff)
Rename 'runtime_version' to 'version'
Diffstat (limited to 'xmake/modules/detect')
-rw-r--r--xmake/modules/detect/sdks/find_matlab.lua12
-rw-r--r--xmake/modules/detect/sdks/find_matlab_runtime.lua12
2 files changed, 12 insertions, 12 deletions
diff --git a/xmake/modules/detect/sdks/find_matlab.lua b/xmake/modules/detect/sdks/find_matlab.lua
index b8089d170..308926be0 100644
--- a/xmake/modules/detect/sdks/find_matlab.lua
+++ b/xmake/modules/detect/sdks/find_matlab.lua
@@ -33,7 +33,7 @@ import("detect.sdks.matlab")
--
function main(opt)
opt = opt or {}
- local runtime_version = opt.runtime_version and tostring(opt.runtime_version) or nil
+ local version = opt.version and tostring(opt.version) or nil
local result = {sdkdir = "", includedirs = {}, linkdirs = {}, links = {}}
if is_host("windows") then
local matlabkey = "HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB"
@@ -43,14 +43,14 @@ function main(opt)
end
local itemkey
- if runtime_version == nil then
+ if version == nil then
itemkey = valuekeys[1] .. ";MATLABROOT"
else
- local versionname = matlab.versions()[runtime_version]
+ local versionname = matlab.versions()[version]
if versionname ~= nil then
- itemkey = matlabkey .. "\\" .. runtime_version .. ";MATLABROOT"
+ itemkey = matlabkey .. "\\" .. version .. ";MATLABROOT"
else
- local versionvalue = matlab.versions_names()[runtime_version:lower()]
+ local versionvalue = matlab.versions_names()[version:lower()]
if versionvalue ~= nil then
itemkey = matlabkey .. "\\" .. versionvalue .. ";MATLABROOT"
else
@@ -58,7 +58,7 @@ function main(opt)
for k, v in pairs(matlab.versions()) do
print(" ", k, v)
end
- raise("MATLAB Runtime version does not exist: " .. runtime_version)
+ raise("MATLAB Runtime version does not exist: " .. version)
end
end
end
diff --git a/xmake/modules/detect/sdks/find_matlab_runtime.lua b/xmake/modules/detect/sdks/find_matlab_runtime.lua
index 41f1f0efd..917a6c473 100644
--- a/xmake/modules/detect/sdks/find_matlab_runtime.lua
+++ b/xmake/modules/detect/sdks/find_matlab_runtime.lua
@@ -33,7 +33,7 @@ import("detect.sdks.matlab")
--
function main(opt)
opt = opt or {}
- local runtime_version = opt.runtime_version and tostring(opt.runtime_version) or nil
+ local version = opt.version and tostring(opt.version) or nil
local result = {sdkdir = "", includedirs = {}, linkdirs = {}, links = {}, bindirs = {}}
if is_host("windows") then
local matlabkey = "HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB Runtime"
@@ -45,18 +45,18 @@ function main(opt)
local itemkey
local versionname
local versionvalue
- if runtime_version == nil then
+ if version == nil then
local splitvaluekeys = valuekeys[1]:split("\\")
versionvalue = splitvaluekeys[#splitvaluekeys]
versionname = matlab.versions()[versionvalue]
itemkey = valuekeys[1] .. ";MATLABROOT"
else
- versionname = matlab.versions()[runtime_version]
+ versionname = matlab.versions()[version]
if versionname ~= nil then
versionvalue = matlab.versions_names()[versionname:lower()]
- itemkey = matlabkey .. "\\" .. runtime_version .. ";MATLABROOT"
+ itemkey = matlabkey .. "\\" .. version .. ";MATLABROOT"
else
- versionvalue = matlab.versions_names()[runtime_version:lower()]
+ versionvalue = matlab.versions_names()[version:lower()]
versionname = matlab.versions()[versionvalue]
if versionvalue ~= nil then
itemkey = matlabkey .. "\\" .. versionvalue .. ";MATLABROOT"
@@ -65,7 +65,7 @@ function main(opt)
for k, v in pairs(matlab.versions()) do
print(" ", k, v)
end
- raise("MATLAB Runtime version does not exist: " .. runtime_version)
+ raise("MATLAB Runtime version does not exist: " .. version)
end
end
end