diff options
| author | ruki <[email protected]> | 2022-10-20 00:36:02 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-10-20 00:36:02 +0800 |
| commit | b17daa462dd75c5a218a788698f30955d13ebe5f (patch) | |
| tree | 955e0558e12b0149f8573adc8ffc39ee19a1dabd | |
| parent | 56302de4dff5414efec3cf3216d639ed7ab20b1f (diff) | |
improve to get value from packages
| -rw-r--r-- | xmake/core/project/target.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua index 7eb0a2d94..7cd18e984 100644 --- a/xmake/core/project/target.lua +++ b/xmake/core/project/target.lua @@ -417,7 +417,7 @@ function _instance:get_from_pkgs(name, opt) local configinfo = self:pkgconfig(pkg:name()) -- get values from package components -- e.g. `add_packages("sfml", {components = {"graphics", "window"}})` - if configinfo and configinfo.components then + if configinfo and configinfo.components and pkg:components() then local components_enabled = hashset.new() for _, comp in ipairs(table.wrap(configinfo.components)) do components_enabled:insert(comp) |
