summaryrefslogtreecommitdiff
path: root/xmake/core/project/target.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2022-10-19 00:53:53 +0800
committerruki <[email protected]>2022-10-19 00:53:53 +0800
commit78fe5e017f14b4459a36b27548d98af9485e9fff (patch)
treeea20def276ec1765b6a77aa67f92adef64dd8635 /xmake/core/project/target.lua
parent3d09499afb17f63704f7b301fc25df116f569ac3 (diff)
improve comments
Diffstat (limited to 'xmake/core/project/target.lua')
-rw-r--r--xmake/core/project/target.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua
index 0b9aa41d6..4e6c21a56 100644
--- a/xmake/core/project/target.lua
+++ b/xmake/core/project/target.lua
@@ -418,6 +418,8 @@ function _instance:get_from_pkgs(name, opt)
-- get values from package components
-- e.g. `add_packages("sfml", {components = {"graphics", "window"}})`
if configinfo and configinfo.components then
+ -- if we can't find the values from the component, we need to fall back to __base to find them.
+ -- it contains some common values of all components
local components = table.wrap(pkg:get("components"))
for _, component_name in ipairs(table.join(configinfo.components, "__base")) do
local info = components[component_name]