remove custom-cmake otion

This commit is contained in:
otavepto 2024-05-28 22:41:30 +03:00
parent 4c318d32b2
commit baeabff6ec

View File

@ -32,15 +32,6 @@ newoption {
description = "Cleanup before any action", description = "Cleanup before any action",
} }
-- local tools
newoption {
category = "tools",
trigger = "custom-cmake",
description = "Use custom cmake",
value = 'path/to/cmake.exe',
default = nil
}
-- deps extraction -- deps extraction
newoption { newoption {
category = "extract", category = "extract",
@ -153,16 +144,11 @@ local third_party_common_dir = path.join(third_party_dir, 'deps', 'common')
local extractor = os.realpath(path.join(third_party_deps_dir, '7za', '7za')) local extractor = os.realpath(path.join(third_party_deps_dir, '7za', '7za'))
local mycmake = os.realpath(path.join(third_party_deps_dir, 'cmake', 'bin', 'cmake')) local mycmake = os.realpath(path.join(third_party_deps_dir, 'cmake', 'bin', 'cmake'))
if _OPTIONS["custom-cmake"] then if os.host() == 'windows' then
mycmake = _OPTIONS["custom-cmake"] mycmake = mycmake .. '.exe'
print('using custom cmake: ' .. _OPTIONS["custom-cmake"]) end
else if not os.isfile(mycmake) then
if os.host() == 'windows' then error('cmake is missing from third-party dir, you can specify custom cmake location, run the script with --help. cmake: ' .. mycmake)
mycmake = mycmake .. '.exe'
end
if not os.isfile(mycmake) then
error('cmake is missing from third-party dir, you can specify custom cmake location, run the script with --help. cmake: ' .. mycmake)
end
end end
if not third_party_dir or not os.isdir(third_party_dir) then if not third_party_dir or not os.isdir(third_party_dir) then
@ -358,12 +344,10 @@ if os.host() == "linux" then
return return
end end
if not _OPTIONS["custom-cmake"] then local ok_chmod, err_chmod = os.chmod(mycmake, "777")
local ok_chmod, err_chmod = os.chmod(mycmake, "777") if not ok_chmod then
if not ok_chmod then error("cannot chmod: " .. err_chmod)
error("cannot chmod: " .. err_chmod) return
return
end
end end
end end