summaryrefslogtreecommitdiff
path: root/xmake/modules/package/tools/meson.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2022-09-16 00:59:01 +0800
committerruki <[email protected]>2022-09-16 00:59:01 +0800
commitde582559ec459001fa1569dc1ff8b64ce1026d8e (patch)
tree6ee04c71dcc0791c1a99dc65796f83e0b7ae0516 /xmake/modules/package/tools/meson.lua
parent842da2ab4ccb5eca0a5d0d89f350068c72ac74e7 (diff)
pass binaries to meson
Diffstat (limited to 'xmake/modules/package/tools/meson.lua')
-rw-r--r--xmake/modules/package/tools/meson.lua24
1 files changed, 24 insertions, 0 deletions
diff --git a/xmake/modules/package/tools/meson.lua b/xmake/modules/package/tools/meson.lua
index 5ff657ed3..ce21daa0f 100644
--- a/xmake/modules/package/tools/meson.lua
+++ b/xmake/modules/package/tools/meson.lua
@@ -78,6 +78,30 @@ function _get_cross_file(package, opt)
if not os.isfile(crossfile) then
local file = io.open(crossfile, "w")
file:print("[binaries]")
+ local cc = package:build_getenv("cc")
+ if cc then
+ file:print("c='%s'", cc)
+ end
+ local cxx = package:build_getenv("cxx")
+ if cxx then
+ file:print("cpp='%s'", cxx)
+ end
+ local ld = package:build_getenv("ld")
+ if ld then
+ file:print("ld='%s'", ld)
+ end
+ local ar = package:build_getenv("ar")
+ if ar then
+ file:print("ar='%s'", ar)
+ end
+ local strip = package:build_getenv("strip")
+ if strip then
+ file:print("strip='%s'", strip)
+ end
+ local ranlib = package:build_getenv("ranlib")
+ if ranlib then
+ file:print("ranlib='%s'", ranlib)
+ end
local cmake = find_tool("cmake")
if cmake then
file:print("cmake='%s'", cmake.program)