summaryrefslogtreecommitdiff
path: root/xmake/modules/package/tools/autoconf.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2024-03-09 00:57:44 +0800
committerruki <[email protected]>2024-03-09 00:57:44 +0800
commit7bf30c741e467d22ba72e2a01524b3ca071f552c (patch)
treebcb5727988f6c7ac9962cb6652262bad89b3b071 /xmake/modules/package/tools/autoconf.lua
parent927f7fcf64775133f351f0a4a4104a4b971dd9b8 (diff)
fix cygwin paths
Diffstat (limited to 'xmake/modules/package/tools/autoconf.lua')
-rw-r--r--xmake/modules/package/tools/autoconf.lua18
1 files changed, 9 insertions, 9 deletions
diff --git a/xmake/modules/package/tools/autoconf.lua b/xmake/modules/package/tools/autoconf.lua
index 3555a624b..fd7cea0a7 100644
--- a/xmake/modules/package/tools/autoconf.lua
+++ b/xmake/modules/package/tools/autoconf.lua
@@ -44,7 +44,7 @@ function _translate_paths(package, paths)
end
-- translate cygwin paths
-function _translate_cygwin_paths(package, paths)
+function _translate_cygwin_paths(paths)
if type(paths) == "string" then
return path.cygwin(paths)
elseif type(paths) == "table" then
@@ -57,22 +57,22 @@ function _translate_cygwin_paths(package, paths)
return paths
end
--- get msvc
-function _get_msvc(package)
- local msvc = package:toolchain("msvc") or toolchain.load("msvc", {plat = package:plat(), arch = package:arch()})
- assert(msvc:check(), "vs not found!") -- we need to check vs envs if it has been not checked yet
- return msvc
-end
-
-- translate windows bin path
function _translate_windows_bin_path(bin_path)
if bin_path then
local argv = os.argv(bin_path)
- argv[1] = argv[1]:gsub("\\", "/") .. ".exe"
+ argv[1] = path.unix(argv[1]) .. ".exe"
return os.args(argv)
end
end
+-- get msvc
+function _get_msvc(package)
+ local msvc = package:toolchain("msvc") or toolchain.load("msvc", {plat = package:plat(), arch = package:arch()})
+ assert(msvc:check(), "vs not found!") -- we need to check vs envs if it has been not checked yet
+ return msvc
+end
+
-- map compiler flags
function _map_compflags(package, langkind, name, values)
return compiler.map_flags(langkind, name, values, {target = package})