summaryrefslogtreecommitdiff
path: root/xmake/modules/package/tools/meson.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2023-02-18 00:43:06 +0800
committerruki <[email protected]>2023-02-18 00:43:06 +0800
commit008d4d6b28b0475b4fc1cf0f88fcff7fd0f3c71b (patch)
tree8502c84f39dc8baee83078aa13ac0c624db5d535 /xmake/modules/package/tools/meson.lua
parent1e09fd1f030bc9f0deb4b7f2c6c406ebc2622639 (diff)
add executable_path
Diffstat (limited to 'xmake/modules/package/tools/meson.lua')
-rw-r--r--xmake/modules/package/tools/meson.lua20
1 files changed, 10 insertions, 10 deletions
diff --git a/xmake/modules/package/tools/meson.lua b/xmake/modules/package/tools/meson.lua
index cdfbc7fb1..0df12b796 100644
--- a/xmake/modules/package/tools/meson.lua
+++ b/xmake/modules/package/tools/meson.lua
@@ -25,6 +25,7 @@ import("core.tool.toolchain")
import("core.tool.linker")
import("core.tool.compiler")
import("lib.detect.find_tool")
+import("private.utils.executable_path")
-- get build directory
function _get_buildir(package, opt)
@@ -70,42 +71,41 @@ function _get_cross_file(package, opt)
file:print("[binaries]")
local cc = package:build_getenv("cc")
if cc then
- -- we need split it, maybe is `xcrun -sdk iphoneos clang`
- file:print("c=['%s']", table.concat(os.argv(cc), "', '"))
+ file:print("c='%s'", executable_path(cc))
end
local cxx = package:build_getenv("cxx")
if cxx then
- file:print("cpp=['%s']", table.concat(os.argv(cxx), "', '"))
+ file:print("cpp='%s'", executable_path(cxx))
end
local ld = package:build_getenv("ld")
if ld then
- file:print("ld=['%s']", table.concat(os.argv(ld), "', '"))
+ file:print("ld='%s'", executable_path(ld))
end
local ar = package:build_getenv("ar")
if ar then
- file:print("ar=['%s']", table.concat(os.argv(ar), "', '"))
+ file:print("ar='%s'", executable_path(ar))
end
local strip = package:build_getenv("strip")
if strip then
- file:print("strip='%s'", strip)
+ file:print("strip='%s'", executable_path(strip))
end
local ranlib = package:build_getenv("ranlib")
if ranlib then
- file:print("ranlib='%s'", ranlib)
+ file:print("ranlib='%s'", executable_path(ranlib))
end
if package:is_plat("mingw") then
local mrc = package:build_getenv("mrc")
if mrc then
- file:print("windres='%s'", mrc)
+ file:print("windres='%s'", executable_path(mrc))
end
end
local cmake = find_tool("cmake")
if cmake then
- file:print("cmake='%s'", cmake.program)
+ file:print("cmake='%s'", executable_path(cmake.program))
end
local pkgconfig = _get_pkgconfig(package)
if pkgconfig then
- file:print("pkgconfig='%s'", pkgconfig)
+ file:print("pkgconfig='%s'", executable_path(pkgconfig))
end
file:print("")