From 7fb15303e334f1169add27ad5a53b4a52396cea0 Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 7 Sep 2024 00:33:40 +0800 Subject: [PATCH] fix bin path for cmake #5552 --- xmake/modules/package/tools/cmake.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua index 8e103959d19..13907c84048 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"