summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/package/tools/cmake.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua
index 8e103959d..13907c840 100644
--- a/xmake/modules/package/tools/cmake.lua
+++ b/xmake/modules/package/tools/cmake.lua
@@ -56,7 +56,8 @@ end
function _translate_bin_path(bin_path)
if is_host("windows") and bin_path then
bin_path = bin_path:gsub("\\", "/")
- if not bin_path:find(string.ipattern("%.exe$")) and
+ if not os.isfile(bin_path) and
+ 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"