diff options
| -rw-r--r-- | xmake/modules/private/action/require/impl/package.lua | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/xmake/modules/private/action/require/impl/package.lua b/xmake/modules/private/action/require/impl/package.lua index a2357f984..72ea3807a 100644 --- a/xmake/modules/private/action/require/impl/package.lua +++ b/xmake/modules/private/action/require/impl/package.lua @@ -69,9 +69,9 @@ end -- - add_requires("zlib~shared", {configs = {shared = true}, alias = "zlib_shared"}) -- -- {system = nil/true/false}: --- nil: get local or system packages +-- nil: get remote or system packages -- true: only get system package --- false: only get local packages +-- false: only get remote packages -- -- function _parse_require(require_str) @@ -614,6 +614,11 @@ function should_install(package) if package:is_fetchonly() then return false end + -- only get system package? e.g. add_requires("xxx", {system = true}) + local requireinfo = package:requireinfo() + if requireinfo and requireinfo.system then + return false + end if package:parents() then -- if all the packages that depend on it already exist, then there is no need to install it for _, parent in pairs(package:parents()) do |
