summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
authorruki <[email protected]>2021-02-14 09:27:05 +0800
committerruki <[email protected]>2021-02-14 09:27:05 +0800
commitd22832a1eaf691db8aae20d0d08f08a98a19d23b (patch)
tree62e380ec8212d918086334387b64a5649bcc2b8e /xmake/modules
parentd99e19ac256c00f965b4f39c8f4243844393e256 (diff)
switch package toolchain
Diffstat (limited to 'xmake/modules')
-rw-r--r--xmake/modules/private/action/require/impl/actions/install.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/xmake/modules/private/action/require/impl/actions/install.lua b/xmake/modules/private/action/require/impl/actions/install.lua
index a9a46d49b..f8ce349d9 100644
--- a/xmake/modules/private/action/require/impl/actions/install.lua
+++ b/xmake/modules/private/action/require/impl/actions/install.lua
@@ -91,6 +91,15 @@ function _patch_pkgconfig(package)
end
end
+-- check package toolchains
+function _check_package_toolchains(package)
+ for _, toolchain_inst in pairs(package:toolchains()) do
+ if not toolchain_inst:check() then
+ raise("toolchain(\"%s\"): not found!", toolchain_inst:name())
+ end
+ end
+end
+
-- install the given package
function main(package)
@@ -155,6 +164,9 @@ function main(package)
dep:envs_enter()
end
+ -- check package toolchains
+ _check_package_toolchains(package)
+
-- download package resources
download_resources(package)