summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/private/action/require/impl/install_packages.lua2
1 files changed, 1 insertions, 1 deletions
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