From baeabff6ec856f74c52e8ede5f452a057ee318af Mon Sep 17 00:00:00 2001 From: otavepto <153766569+otavepto@users.noreply.github.com> Date: Tue, 28 May 2024 22:41:30 +0300 Subject: [PATCH] remove custom-cmake otion --- premake5-deps.lua | 34 +++++++++------------------------- 1 file changed, 9 insertions(+), 25 deletions(-) diff --git a/premake5-deps.lua b/premake5-deps.lua index 4d38a603..1fe6460f 100644 --- a/premake5-deps.lua +++ b/premake5-deps.lua @@ -32,15 +32,6 @@ newoption { 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 newoption { 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 mycmake = os.realpath(path.join(third_party_deps_dir, 'cmake', 'bin', 'cmake')) -if _OPTIONS["custom-cmake"] then - mycmake = _OPTIONS["custom-cmake"] - print('using custom cmake: ' .. _OPTIONS["custom-cmake"]) -else - if os.host() == 'windows' then - 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 +if os.host() == 'windows' then + 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 if not third_party_dir or not os.isdir(third_party_dir) then @@ -358,12 +344,10 @@ if os.host() == "linux" then return end - if not _OPTIONS["custom-cmake"] then - local ok_chmod, err_chmod = os.chmod(mycmake, "777") - if not ok_chmod then - error("cannot chmod: " .. err_chmod) - return - end + local ok_chmod, err_chmod = os.chmod(mycmake, "777") + if not ok_chmod then + error("cannot chmod: " .. err_chmod) + return end end