From 4940fa6a0967b3e4840eeefb057cff2ffd3d7e7b Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 31 Mar 2021 22:39:53 +0800 Subject: fix optional dep --- xmake/modules/private/action/require/impl/install_packages.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmake/modules/private/action/require/impl/install_packages.lua b/xmake/modules/private/action/require/impl/install_packages.lua index 096190945..efc0c73a9 100644 --- a/xmake/modules/private/action/require/impl/install_packages.lua +++ b/xmake/modules/private/action/require/impl/install_packages.lua @@ -186,7 +186,7 @@ function _install_packages(packages_install, packages_download, installdeps) local dep_not_found = nil for _, dep in pairs(installdeps[tostring(pkg)]) do local installed = packages_installed[tostring(dep)] - if installed == false or (installed == nil and not dep:exists()) then + if installed == false or (installed == nil and not dep:exists() and not dep:is_optional()) then ready = false dep_not_found = dep break -- cgit v1.3.1