Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ndk: use unix path even on Windows #4903

Merged
merged 5 commits into from
Mar 31, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions xmake/modules/package/tools/autoconf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,22 @@ function buildenvs(package, opt)
envs.LDSHARED = _translate_windows_bin_path(envs.LDSHARED)
envs.CPP = _translate_windows_bin_path(envs.CPP)
envs.RANLIB = _translate_windows_bin_path(envs.RANLIB)
if package:is_plat("android") then
SirLynix marked this conversation as resolved.
Show resolved Hide resolved
-- use unix path separator on android as windows seps may not be understood by some tools (e.g. openssl's perl)
envs.CFLAGS = path.unix(envs.CFLAGS)
envs.CXXFLAGS = path.unix(envs.CXXFLAGS)
envs.CPPFLAGS = path.unix(envs.CPPFLAGS)
envs.ASFLAGS = path.unix(envs.ASFLAGS)
if envs.ARFLAGS then
envs.ARFLAGS = path.unix(envs.ARFLAGS)
end
if envs.LDFLAGS then
envs.LDFLAGS = path.unix(envs.LDFLAGS)
end
if envs.SHFLAGS then
envs.SHFLAGS = path.unix(envs.SHFLAGS)
end
end
end
local ACLOCAL_PATH = {}
local PKG_CONFIG_PATH = {}
Expand Down
10 changes: 5 additions & 5 deletions xmake/modules/package/tools/cmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ function _get_cflags(package, opt)
end
table.join2(result, _get_cflags_from_packagedeps(package, opt))
if #result > 0 then
return os.args(result)
return _translate_paths(os.args(result))
SirLynix marked this conversation as resolved.
Show resolved Hide resolved
end
end

Expand Down Expand Up @@ -200,7 +200,7 @@ function _get_cxxflags(package, opt)
end
table.join2(result, _get_cflags_from_packagedeps(package, opt))
if #result > 0 then
return os.args(result)
return _translate_paths(os.args(result))
end
end

Expand All @@ -219,7 +219,7 @@ function _get_asflags(package, opt)
table.join2(result, opt.asflags)
end
if #result > 0 then
return os.args(result)
return _translate_paths(os.args(result))
end
end

Expand All @@ -245,7 +245,7 @@ function _get_ldflags(package, opt)
table.join2(result, opt.ldflags)
end
if #result > 0 then
return os.args(result)
return _translate_paths(os.args(result))
end
end

Expand All @@ -271,7 +271,7 @@ function _get_shflags(package, opt)
table.join2(result, opt.shflags)
end
if #result > 0 then
return os.args(result)
return _translate_paths(os.args(result))
end
end

Expand Down
Loading