summaryrefslogtreecommitdiff
path: root/xmake/modules/package/tools/meson.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2021-07-03 00:34:08 +0800
committerruki <[email protected]>2021-07-03 00:34:08 +0800
commit9068e48983a41c30a020c302913fbdb4e4c66f9e (patch)
tree1ef415646d3b6e2765c51b4393661575ed90c6ee /xmake/modules/package/tools/meson.lua
parentc44d6060e82fc332e0f7370398bcbbaed7278543 (diff)
add os.joinenvs
Diffstat (limited to 'xmake/modules/package/tools/meson.lua')
-rw-r--r--xmake/modules/package/tools/meson.lua10
1 files changed, 2 insertions, 8 deletions
diff --git a/xmake/modules/package/tools/meson.lua b/xmake/modules/package/tools/meson.lua
index a6bdec48a..6361f2a0e 100644
--- a/xmake/modules/package/tools/meson.lua
+++ b/xmake/modules/package/tools/meson.lua
@@ -69,7 +69,7 @@ end
-- get msvc run environments
function _get_msvc_runenvs(package)
- return _get_msvc(package):runenvs()
+ return os.joinenvs(_get_msvc(package):runenvs())
end
-- fix libname on windows
@@ -89,13 +89,7 @@ function buildenvs(package)
envs.CXXFLAGS = table.concat(cxxflags, ' ')
envs.ASFLAGS = table.concat(table.wrap(package:config("asflags")), ' ')
if package:is_plat("windows") then
- for name, values in pairs(_get_msvc_runenvs(package)) do
- local oldvalues = os.getenv(name)
- if oldvalues then
- values = values .. path.envsep() .. oldvalues
- end
- envs[name] = values
- end
+ envs = os.joinenvs(envs, _get_msvc_runenvs(package))
end
else
local cflags = table.join(table.wrap(package:build_getenv("cxflags")), package:build_getenv("cflags"))