summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-03-25 23:38:32 +0800
committerruki <[email protected]>2022-03-25 23:38:32 +0800
commit4ab3d420d30399b945189cc2a724384467763239 (patch)
tree027ece7faa4a361c7b0f8bd5b5cae7b51f224501
parentd5fa1e2e2efaef66bd34ff071e9b9f5c89d41045 (diff)
fix tools.cmake
-rw-r--r--xmake/modules/package/tools/cmake.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua
index 2b2fcb975..cced3c96f 100644
--- a/xmake/modules/package/tools/cmake.lua
+++ b/xmake/modules/package/tools/cmake.lua
@@ -52,7 +52,12 @@ end
-- translate bin path
function _translate_bin_path(bin_path)
if is_host("windows") and bin_path then
- return bin_path:gsub("\\", "/") .. ".exe"
+ bin_path = bin_path:gsub("\\", "/")
+ if not bin_path:find(string.ipattern("%.exe$")) and
+ not bin_path:find(string.ipattern("%.cmd$")) and
+ not bin_path:find(string.ipattern("%.bat$")) then
+ bin_path = bin_path .. ".exe"
+ end
end
return bin_path
end