summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-11-23 00:44:05 +0800
committerruki <[email protected]>2023-11-23 00:44:05 +0800
commitefe8b4c68109d6c8d09c9a98236bf9bd11164ed3 (patch)
treec3a649f9106332f26f71938e52a9384189a16441
parente8487ecb297934071c4daeab46228d7b85f37edf (diff)
improve to translate flags for meson #4407
-rw-r--r--xmake/modules/package/tools/meson.lua7
1 files changed, 2 insertions, 5 deletions
diff --git a/xmake/modules/package/tools/meson.lua b/xmake/modules/package/tools/meson.lua
index bfb981256..c8e07f2da 100644
--- a/xmake/modules/package/tools/meson.lua
+++ b/xmake/modules/package/tools/meson.lua
@@ -155,16 +155,13 @@ function _get_cross_file(package, opt)
table.join2(ldflags, _get_ldflags_from_packagedeps(package, opt))
table.join2(shflags, _get_ldflags_from_packagedeps(package, opt))
if #cflags > 0 then
- cflags = _translate_flags(package, cflags)
file:print("c_args=['%s']", table.concat(cflags, "', '"))
end
if #cxxflags > 0 then
- cxxflags = _translate_flags(package, cxxflags)
file:print("cpp_args=['%s']", table.concat(cxxflags, "', '"))
end
local linkflags = table.join(ldflags or {}, shflags)
if #linkflags > 0 then
- linkflags = _translate_flags(package, linkflags)
file:print("c_link_args=['%s']", table.concat(linkflags, "', '"))
file:print("cpp_link_args=['%s']", table.concat(linkflags, "', '"))
end
@@ -352,7 +349,7 @@ function _get_cflags_from_packagedeps(package, opt)
end
end
end
- return result
+ return _translate_flags(package, result)
end
-- get ldflags from package deps
@@ -369,7 +366,7 @@ function _get_ldflags_from_packagedeps(package, opt)
end
end
end
- return result
+ return _translate_flags(package, result)
end
-- get the build environments